summaryrefslogtreecommitdiffstats
path: root/devtools/server/tests/xpcshell/head_dbg.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/server/tests/xpcshell/head_dbg.js')
-rw-r--r--devtools/server/tests/xpcshell/head_dbg.js29
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);