Use a node bit for connectedness.

RESOLVED FIXED in Firefox 63

Status

()

enhancement
RESOLVED FIXED
9 months ago
2 months ago

People

(Reporter: emilio, Assigned: emilio)

Tracking

unspecified
mozilla63
Points:
---

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

No description provided.
Assignee

Comment 1

9 months ago
While trying to repro bug 1484293 I noticed that this assertion failed:

https://searchfox.org/mozilla-central/rev/ef8b3886cb173d5534b954b6fb7eb2d94a9473d0/dom/base/ShadowRoot.cpp#160

(during unlink, while unbinding the kids)

We rely on GetComposedDoc returning the right thing during unbind to cleanup
some stuff (see bug 1473637 for example), so it should probably be correct all
the time, regardless of whether something is unlinked or not.

Also this makes GetComposedDoc() much faster, which is nice too, since we call
it somewhat often.

I removed NodeHasRelevantHoverRules, since it's unused (was used by the old
style system).

I moved the SetIsConnected(false) call for the shadow root to before unbinding
the kids for consistency with what Element does with the uncomposed doc flag,
now that the children's connectedness doesn't depend on the shadow root's.
Comment on attachment 9002246 [details]
Use a node bit for connectedness.

Olli Pettay [:smaug] has approved the revision.
Attachment #9002246 - Flags: review+

Comment 4

9 months ago
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/39f61de4e7bb
Use a node bit for connectedness. r=smaug
Backed out changeset 39f61de4e7bb (Bug 1484478) for bustages in /builds/worker/workspace/build/src/dom/base/ShadowRoot.cpp:526:20

Problematic push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=39f61de4e7bb164f1ad812852b4f46bd18e3d96d&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-classifiedState=unclassified
Failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-classifiedState=unclassified&selectedJob=194819789
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=194819789&repo=autoland&lineNumber=18616

[task 2018-08-20T11:13:10.107Z] 11:13:10     INFO -  /builds/worker/workspace/build/src/dom/base/ShadowRoot.cpp:526:20: error: unused variable 'doc' [-Werror=unused-variable]
[task 2018-08-20T11:13:10.107Z] 11:13:10     INFO -     if (nsIDocument* doc = GetComposedDoc()) {
[task 2018-08-20T11:13:10.108Z] 11:13:10     INFO -                      ^~~
[task 2018-08-20T11:13:10.108Z] 11:13:10     INFO -  cc1plus: all warnings being treated as errors
[task 2018-08-20T11:13:10.108Z] 11:13:10     INFO -  /builds/worker/workspace/build/src/config/rules.mk:1088: recipe for target 'Unified_cpp_dom_base4.o' failed
[task 2018-08-20T11:13:10.108Z] 11:13:10     INFO -  make[4]: *** [Unified_cpp_dom_base4.o] Error 1
[task 2018-08-20T11:13:10.108Z] 11:13:10     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/dom/base'
[task 2018-08-20T11:13:10.108Z] 11:13:10     INFO -  make[4]: *** Waiting for unfinished jobs....
Flags: needinfo?(emilio)

Comment 6

9 months ago
Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fb70309402b4
Backed out changeset 39f61de4e7bb for bustages in /builds/worker/workspace/build/src/dom/base/ShadowRoot.cpp:526:20
Assignee

Updated

9 months ago
Flags: needinfo?(emilio)

Comment 7

9 months ago
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/31ed81aa4f46
Use a node bit for connectedness. r=smaug

Comment 8

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/31ed81aa4f46
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.