Closed Bug 1568055 Opened 1 year ago Closed 1 year ago

Create embedder windows before iframes during static clone


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




Fission Milestone M4
Tracking Status
firefox70 --- fixed


(Reporter: Nika, Assigned: Nika)




(1 file, 1 obsolete file)

Currently when doing a static clone, the window global for an iframe ends up being created before the window global for the document the iframe is in is created. This is due to the document being created as a data document without being attached to a specific global, and then only being attached after the clone is complete.

This bug is to explore ways to standardize document creation order more so we can create window globals for embedders before we embed any iframes within them.

This should help ensure that the embedder is always set soon enough that we
don't run into the situation which caused the null deref fixed by part 1.

This patch also adds an assertion earlier in WindowGlobalParent's lifecycle to
ensure that the condition is satisfied. This patch likely should not be uplifted.

This should ensure that the inner window for each document is set up correctly
before iframe elements are created in them during a static clone. Other,
non-static-clone cases are not affected because they cannot load subframes.

Attachment #9079857 - Attachment description: Bug 1565489 - Part 2: Set embedder for BrowsingContext upon frame creation, → Bug 1568055 - Part 2: Set embedder for BrowsingContext upon frame creation,
Pushed by
Part 1: SetDocument earlier in the clone operation for print, r=farre
Part 2: Set embedder for BrowsingContext upon frame creation, r=farre

(In reply to Narcis Beleuzu [:NarcisB] from comment #4)

Backed out or Assertion failures (MOZ_ASSERT_UNREACHABLE: leaking stream event)

Backout link:
Log link:

(note: this only backed out part 2 - part 1 should still have landed IIRC)

Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

I'll move landing part 2 into a separate bug.

Flags: needinfo?(nika)
Blocks: 1568517
Fission Milestone: --- → M4
Attachment #9079857 - Attachment is obsolete: true
Regressions: 1525254
You need to log in before you can comment on or make changes to this bug.