Closed Bug 1568055 Opened 1 year ago Closed 1 year ago

Create embedder windows before iframes during static clone

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla70
Fission Milestone M4
Tracking Status
firefox70 --- fixed

People

(Reporter: Nika, Assigned: Nika)

References

Details

Attachments

(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 nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/86b038c5430e
Part 1: SetDocument earlier in the clone operation for print, r=farre
https://hg.mozilla.org/integration/autoland/rev/f74c9d255293
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: https://hg.mozilla.org/integration/autoland/rev/71c65b2ee5b6ae54afed11cc48a660e66d23138b
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=257895250&repo=autoland&lineNumber=30162

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

Status: NEW → RESOLVED
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.