Closed Bug 1352290 Opened 3 years ago Closed 2 years ago

Add assertions to CustomElementReactionsStack::Enqueue to ensure upgrade reactions aren't scheduled to BackupQueue

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: edgar, Assigned: edgar)

References

Details

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a follow-up of Bug #1299363 comment# 63 +++

After reviewing the all possible cases that may trigger upgrade steps in spec again (and also apply some local WIP patches to test),
- customElements.define: https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementregistry-define
- document.createElement: https://dom.spec.whatwg.org/#dom-document-createelement
- document.createElementNS: https://dom.spec.whatwg.org/#dom-document-createelementns
- document.importNode: https://dom.spec.whatwg.org/#dom-document-importnode
- document.write: https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-write
- document.writeln: https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-writeln
- Element.innerHTML: https://w3c.github.io/DOM-Parsing/#dom-element-innerhtml
- Node.clone: https://dom.spec.whatwg.org/#concept-node-clone
- create element from parser: https://html.spec.whatwg.org/multipage/syntax.html#create-an-element-for-the-token

Most of API annotated with [CEReactions], excepts
- document.createElement[NS] runs upgrade steps synchronously, instead of interacting with reaction queue.
- parser bit has its own ReactionsStack push/pop.

So the upgrade reactions should not be scheduled to BackupQueue.
Priority: -- → P2
Attached patch Patch, v1 (obsolete) — Splinter Review
Attachment #8919311 - Flags: feedback?(jdai)
Attachment #8919311 - Flags: feedback?(jdai) → feedback+
Attachment #8919311 - Flags: review?(bugs)
Attachment #8919311 - Flags: review?(bugs) → review+
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/96c6513a7f56
Add assertion to CustomElementReactionsStack::Enqueue to ensure upgrade reactions aren't scheduled to BackupQueue; r=smaug
https://hg.mozilla.org/mozilla-central/rev/96c6513a7f56
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.