From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- devtools/server/actors/targets/base-target-actor.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'devtools/server/actors/targets/base-target-actor.js') diff --git a/devtools/server/actors/targets/base-target-actor.js b/devtools/server/actors/targets/base-target-actor.js index f3fc2a89e7..646874c4f1 100644 --- a/devtools/server/actors/targets/base-target-actor.js +++ b/devtools/server/actors/targets/base-target-actor.js @@ -203,6 +203,18 @@ class BaseTargetActor extends Actor { ) { return; } + // In the browser toolbox, when debugging the parent process, we should only toggle the tracer in the Parent Process Target Actor. + // We have to ignore any frame target which may run in the parent process. + // For example DevTools documents or a tab running in the parent process. + // (PROCESS_TYPE_DEFAULT refers to the parent process) + if ( + this.sessionContext.type == "all" && + this.targetType === Targets.TYPES.FRAME && + this.typeName != "parentProcessTarget" && + Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_DEFAULT + ) { + return; + } const tracerActor = this.getTargetScopedActor("tracer"); tracerActor.startTracing(options.tracerOptions); } else if (this.hasTargetScopedActor("tracer")) { -- cgit v1.2.3