Can't break on DOM mutations on UA widgets.
Categories
(DevTools :: Debugger, defect)
Tracking
(firefox114 fixed)
| Tracking | Status | |
|---|---|---|
| firefox114 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(2 files, 1 obsolete file)
|
1.44 KB,
patch
|
Details | Diff | Splinter Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
STR:
- Apply the attached patch.
- Set
devtools.inspector.showAllAnonymousContent=true. - Open
data:text/html,<video controls>. - Inspect the Play / Pause button, set an attribute modification breakpoint, and click it.
ER:
- Breakpoint gets triggered.
AR:
- The window isn't paused.
A bit of debugging indicates that getNewFrame() is null here, so we bail out.
I think this is because UA widgets run from a separate JS global (the UA widget scope) see here.
Comment 1•3 years ago
|
||
On the DevTools side, we control the global registered to the Debugger API over there:
https://searchfox.org/mozilla-central/rev/ad732108b073742d7324f998c085f459674a6846/devtools/server/actors/targets/window-global.js#290-295
windows will typicaly be only refering the the debugged page window object and only this.
If the DOM mutation is fired by a global that is not registered in the Debugger API, it could easily explain failures.
But if we can get access to such distinct global, we could probably add it to the list of globals returned by findDebuggees.
And/or, if this global is created after devtools are opened, we might need to tweak _shouldAddNewGlobalAsDebuggee to accept this special global. (this function is called for all new globals created in the same process)
We already try to accept webextension content script sandboxes.
| Assignee | ||
Comment 2•3 years ago
|
||
This does the trick! Do you know how to possibly test this?
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Comment 5•3 years ago
|
||
| bugherder | ||
Description
•