Closed
Bug 1396620
Opened 7 years ago
Closed 7 years ago
Remove created callback for custom elements (deprecated in v1)
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla59
People
(Reporter: jessica, Assigned: edgar)
References
Details
Attachments
(2 files)
No description provided.
Updated•7 years ago
|
Updated•7 years ago
|
Priority: -- → P2
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → echen
Assignee | ||
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8928363 -
Flags: feedback?(jdai)
Assignee | ||
Updated•7 years ago
|
Attachment #8928364 -
Flags: feedback?(jdai)
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8928363 [details]
Bug 1396620 - Part 1: Remove created callback for custom elements;
https://reviewboard.mozilla.org/r/199570/#review204774
Attachment #8928363 -
Flags: review+
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8928364 [details]
Bug 1396620 - Part 2: Fix compartment mismatch crash when doing old prototype swizzling for custom element;
https://reviewboard.mozilla.org/r/199572/#review204762
::: dom/base/Element.cpp:527
(Diff revision 1)
> + // The custom element prototype could be in different compartment.
> + if (!JS_WrapObject(aCx, &customProto)) {
> + return nullptr;
> + }
I guess this patch came from bug 1408828 comment 12[1]. Is this case still can happened in this bug? We won't enqueue an additional connectedCallback in BindToTree() which will get fired before createdCallback, right? Maybe I miss something...
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1408828#c12
Updated•7 years ago
|
Attachment #8928363 -
Flags: feedback?(jdai) → feedback+
Updated•7 years ago
|
Attachment #8928363 -
Flags: review+
Updated•7 years ago
|
Attachment #8928364 -
Flags: feedback?(jdai)
Assignee | ||
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8928364 [details]
Bug 1396620 - Part 2: Fix compartment mismatch crash when doing old prototype swizzling for custom element;
https://reviewboard.mozilla.org/r/199572/#review204796
::: dom/base/Element.cpp:527
(Diff revision 1)
> + // The custom element prototype could be in different compartment.
> + if (!JS_WrapObject(aCx, &customProto)) {
> + return nullptr;
> + }
Yeah, we still need this, though the prototype swizzling here might eventually be removed in bug 1416999.
We hit the compartment mismatch in https://searchfox.org/mozilla-central/rev/a662f122c37704456457a526af90db4e3c0fd10e/js/xpconnect/tests/mochitest/test_bug1094930.html.
Originally the Element::WrapObject happens during invoking createdCallback, which is invoked synchronously during `new f();`, and we are in the same compartment of `customProto`, a.k.a, the iframe one.
However, in part 1, we change test to use connectedCallback, the Element::WrapObject now happens during invoking connectedCallback, which is invoked during processing ElementQueue for `appendChild` and we are in the entry global's compartment, a.k.a. main window one. Then we hit the compartment mismatch in this case.
Assignee | ||
Comment 9•7 years ago
|
||
Comment on attachment 8928364 [details]
Bug 1396620 - Part 2: Fix compartment mismatch crash when doing old prototype swizzling for custom element;
Per comment #8.
Attachment #8928364 -
Flags: feedback?(jdai)
Updated•7 years ago
|
Attachment #8928364 -
Flags: feedback?(jdai) → feedback+
Assignee | ||
Updated•7 years ago
|
Attachment #8928363 -
Flags: review?(bugs)
Attachment #8928364 -
Flags: review?(bugs)
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8928363 [details]
Bug 1396620 - Part 1: Remove created callback for custom elements;
https://reviewboard.mozilla.org/r/199570/#review205412
rs+
Attachment #8928363 -
Flags: review?(bugs) → review+
Comment 11•7 years ago
|
||
mozreview-review |
Comment on attachment 8928364 [details]
Bug 1396620 - Part 2: Fix compartment mismatch crash when doing old prototype swizzling for custom element;
https://reviewboard.mozilla.org/r/199572/#review205416
Attachment #8928364 -
Flags: review?(bugs) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 14•7 years ago
|
||
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ed0cc9f86583
Part 1: Remove created callback for custom elements; r=jdai,smaug
https://hg.mozilla.org/integration/autoland/rev/b6b642efbb74
Part 2: Fix compartment mismatch crash when doing old prototype swizzling for custom element; r=smaug
Comment 15•7 years ago
|
||
Backed out changeset ed0cc9f86583::b6b642efbb74 (bug 1396620) for static failure at dom/base/CustomElementRegistry.cpp r=backout on a CLOSED TREE
This is the log of the failure https://treeherder.mozilla.org/logviewer.html#?job_id=145397725&repo=autoland&lineNumber=23154
Push failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=b6b642efbb746ef4b132a46bb9b85b155fd75115&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Backout: https://hg.mozilla.org/integration/autoland/rev/c8df3c4848c5b6cd2465e004ca985b4c4d5db7e9
Flags: needinfo?(echen)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 18•7 years ago
|
||
Flags: needinfo?(echen)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 21•7 years ago
|
||
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1d0330d6d96f
Part 1: Remove created callback for custom elements; r=jdai,smaug
https://hg.mozilla.org/integration/autoland/rev/010494388349
Part 2: Fix compartment mismatch crash when doing old prototype swizzling for custom element; r=smaug
Comment 22•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1d0330d6d96f
https://hg.mozilla.org/mozilla-central/rev/010494388349
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 23•7 years ago
|
||
Mark 57/58 won't fix. Let it ride the train.
status-firefox58:
--- → wontfix
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•