Closed Bug 1761975 Opened 2 years ago Closed 2 years ago

ExtensionContent.jsm appears in the debugger while debugging a page with a web extension content script

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox103 fixed)

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In the test I'm adding in bug 1761368, I can see that ExtensionContent.jsm appears in the debugger, that, even when devtools.chrome.enabled is false.

Severity: -- → S3
Priority: -- → P3

This is easily reproducible when debugging facebook:

  • open devtools
  • load/reload facebook.com (it is important to load/reload while the debugger is opened, it doesn't reproduce when opening debugger on the page already loaded)

AR: Extension.jsm appears
ER: This should probably not appear as it is an internal of WebExt codebase.

This isn't the whole ExtensionContent.jsm file that appears in the debugger, but only the following bits injected via a sandbox:
https://searchfox.org/mozilla-central/rev/ace2c59e6c56b2dcba25af1aa8903a5e7f9a5857/toolkit/components/extensions/ExtensionContent.jsm#844-888

This is a bit tricky to filter out because the sandbox here is the one used to inject the WebExtension content scripts.
This see these sources thanks to this code:
https://searchfox.org/mozilla-central/rev/ace2c59e6c56b2dcba25af1aa8903a5e7f9a5857/devtools/server/actors/targets/window-global.js#307
We can't change any of that, or the content scripts would all disappear.

We would most likely have to ignore this very particular source...

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bdb40c0a7307
[devtools] Hide ExtensionContent.jsm when debugging page with WebExt content scripts. r=bomsy

Backed out for causing Xpcshell failures on test_blackboxing-02.js

Backout link
Push with failures
Link to failure log
Failure line :
TEST-UNEXPECTED-FAIL | devtools/server/tests/xpcshell/test_blackboxing-02.js | xpcshell return code: 0
DBG-TEST: :0: error: IndexedDB UnknownErr: ActorsParent.cpp:565

Flags: needinfo?(poirot.alex)

Sorry I overlooked my try run and missed the xpcshell test failure...

Flags: needinfo?(poirot.alex)
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/520d867921ee
[devtools] Hide ExtensionContent.jsm when debugging page with WebExt content scripts. r=bomsy
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: