Open Bug 1616819 Opened 5 years ago Updated 3 years ago

Debugger.cpp-mediated debugging is failed for most of about:* page after target switching to the page from content process page

Categories

(DevTools :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: daisuke, Unassigned)

Details

This bug was found when we tackled bug 1603176.

STRs:

  1. enable devtools.target-switching.enabled pref
  2. go to https://mozilla.org
  3. open DevTools
  4. select Debugger panel
  5. navigate to about:about

ER: we can see the debuggable resources
AR: no resources

And this issue can be reproduced not only Debugger but also Memory panel as well.
STRs:

  1. enable devtools.target-switching.enabled pref
  2. go to https://mozilla.org
  3. open DevTools
  4. select Memory panel
  5. navigate to about:about
  6. push Take snapshot button

ER: the snapshot should be ~ 60MB
AR: the snapshot is empty (0 MB)

The common thing of both is to use Debugger instance from here.
https://searchfox.org/mozilla-central/source/devtools/server/actors/utils/make-debugger.js#61
Then, the debuggee can not be registered since hitting this condition.
https://searchfox.org/mozilla-central/source/js/src/debugger/Debugger.cpp#4576-4581
Due to this reason, it seems that we can not get the correct result.

NOTE1:
We can see the error message like this if we show the error message via console.error at below place.
new TypeError("debugger and debuggee must be in different compartments", "resource://devtools/server/actors/utils/make-debugger.js", 101)
https://searchfox.org/mozilla-central/source/devtools/server/actors/utils/make-debugger.js#103

NOTE2:
If getting rid of the above condition in Debugger.cpp,
https://searchfox.org/mozilla-central/source/js/src/debugger/Debugger.cpp#4576-4581
we can take memory snapshot, but I'm not sure whether this is correct or not.

Priority: -- → P3

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → about:debugging
Component: about:debugging → General
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.