Closed
Bug 1451037
Opened 7 years ago
Closed 7 years ago
Empty <body> in markup view with shadow dom enabled when loading http://bgrins.github.io/devtools-demos/inspector/shadowdom.html
Categories
(DevTools :: Inspector, defect)
DevTools
Inspector
Tracking
(firefox61 fixed)
RESOLVED
FIXED
Firefox 61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: bgrins, Assigned: jdescottes)
References
Details
Attachments
(1 file)
One liner: `./mach run --devtools --setpref dom.webcomponents.shadowdom.enabled=true http://bgrins.github.io/devtools-demos/inspector/shadowdom.html`
I see only <body></body> and the following error:
console.error: (new TypeError("node is null", "resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/inspector/walker.js", 309))
_ref@resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/inspector/walker.js:309:1
_getBeforeAfterElements@resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/inspector/walker.js:727:18
children@resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/inspector/walker.js:709:29
get numChildren@resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/inspector/node.js:241:21
form@resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/inspector/node.js:110:7
write@resource://devtools/shared/base-loader.js -> resource://devtools/shared/protocol.js:317:44
Reporter | ||
Comment 1•7 years ago
|
||
It turns out v0 is going away in Bug 1426605. We don't really need to support this page, but after talking with Julian we should at least prevent throwing to be safe.
See Also: → 1426605
Assignee | ||
Comment 2•7 years ago
|
||
So far it looks like the implementation fails severely on shadow roots created via the deprecated createShadowRoot().
Platform support should be removed soon-ish, so the main thing we should do here is to make sure we don't throw, since this highlighted weaknesses in our code. I guess walking the children of the old-style shadow root objects returned null nodes, and some spots in the code did not handle that correctly.
Mostly:
- walker.js _getBeforeAfterElements (calling _ref on null nodes)
- walker.js _onReflows (calling Cu.isDeadWrapper on null objects)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•7 years ago
|
||
Wrong analysis on my end. The root cause of the issue is actually with completely empty host components. The code fetching before/after pseudos can easily fail. This can happen with regular web components as well. Adding a fix and a test case.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Reporter | ||
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8964815 [details]
Bug 1451037 - check if shadow host has children when fetching before/after pseudos;
https://reviewboard.mozilla.org/r/233538/#review239372
Attachment #8964815 -
Flags: review?(bgrinstead) → review+
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f68f2c031f58
check if shadow host has children when fetching before/after pseudos;r=bgrins
Comment 8•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•