diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
commit | def92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch) | |
tree | 2ef34b9ad8bb9a9220e05d60352558b15f513894 /devtools/server/tests/xpcshell/head_dbg.js | |
parent | Adding debian version 125.0.3-1. (diff) | |
download | firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/server/tests/xpcshell/head_dbg.js')
-rw-r--r-- | devtools/server/tests/xpcshell/head_dbg.js | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/devtools/server/tests/xpcshell/head_dbg.js b/devtools/server/tests/xpcshell/head_dbg.js index 7161d5eaea..e8547f15b8 100644 --- a/devtools/server/tests/xpcshell/head_dbg.js +++ b/devtools/server/tests/xpcshell/head_dbg.js @@ -22,8 +22,8 @@ appInfo.updateAppInfo({ const { require, loader } = ChromeUtils.importESModule( "resource://devtools/shared/loader/Loader.sys.mjs" ); -const { worker } = ChromeUtils.import( - "resource://devtools/shared/loader/worker-loader.js" +const { worker } = ChromeUtils.importESModule( + "resource://devtools/shared/loader/worker-loader.sys.mjs" ); const { NetUtil } = ChromeUtils.importESModule( @@ -250,11 +250,6 @@ function waitForNewSource(threadFront, url) { }); } -function attachThread(targetFront, options = {}) { - dump("Attaching to thread.\n"); - return targetFront.attachThread(options); -} - function resume(threadFront) { dump("Resuming thread.\n"); return threadFront.resume(); @@ -445,10 +440,14 @@ async function attachTestTab(client, title) { async function attachTestThread(client, title) { const commands = await attachTestTab(client, title); const targetFront = commands.targetCommand.targetFront; - const threadFront = await targetFront.getFront("thread"); - await targetFront.attachThread({ - autoBlackBox: true, + + // Pass any configuration, in order to ensure starting all the thread actors + // and have them to handle debugger statements. + await commands.threadConfigurationCommand.updateConfiguration({ + skipBreakpoints: false, }); + + const threadFront = await targetFront.getFront("thread"); Assert.equal(threadFront.state, "attached", "Thread front is attached"); return { targetFront, threadFront, commands }; } @@ -856,7 +855,15 @@ async function setupTestFromUrl(url) { const targetFront = await descriptorFront.getTarget(); - const threadFront = await attachThread(targetFront); + const commands = await createCommandsDictionary(descriptorFront); + + // Pass any configuration, in order to ensure starting all the thread actor + // and have it to notify about all sources + await commands.threadConfigurationCommand.updateConfiguration({ + skipBreakpoints: false, + }); + + const threadFront = await targetFront.getFront("thread"); const sourceUrl = getFileUrl(url); const promise = waitForNewSource(threadFront, sourceUrl); |