summaryrefslogtreecommitdiffstats
path: root/devtools/server/actors/targets/session-data-processors/breakpoints.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/server/actors/targets/session-data-processors/breakpoints.js')
-rw-r--r--devtools/server/actors/targets/session-data-processors/breakpoints.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/devtools/server/actors/targets/session-data-processors/breakpoints.js b/devtools/server/actors/targets/session-data-processors/breakpoints.js
index ff7cb7ec0a..67c270654d 100644
--- a/devtools/server/actors/targets/session-data-processors/breakpoints.js
+++ b/devtools/server/actors/targets/session-data-processors/breakpoints.js
@@ -7,6 +7,7 @@
const {
STATES: THREAD_STATES,
} = require("resource://devtools/server/actors/thread.js");
+const Targets = require("resource://devtools/server/actors/targets/index.js");
module.exports = {
async addOrSetSessionDataEntry(
@@ -15,6 +16,17 @@ module.exports = {
isDocumentCreation,
updateType
) {
+ // When debugging the whole browser (via the Browser Toolbox), we instantiate both content process and window global (FRAME) targets.
+ // But the debugger will only use the content process target's thread actor.
+ // Thread actor, Sources and Breakpoints have to be only managed for the content process target,
+ // and we should explicitly ignore the window global target.
+ if (
+ targetActor.sessionContext.type == "all" &&
+ targetActor.targetType === Targets.TYPES.FRAME &&
+ targetActor.typeName != "parentProcessTarget"
+ ) {
+ return;
+ }
const { threadActor } = targetActor;
if (updateType == "set") {
threadActor.removeAllBreakpoints();
@@ -37,7 +49,7 @@ module.exports = {
}
},
- removeSessionDataEntry(targetActor, entries, isDocumentCreation) {
+ removeSessionDataEntry(targetActor, entries) {
for (const { location } of entries) {
targetActor.threadActor.removeBreakpoint(location);
}