Coordinate Page.frameNavigated and Runtime.executionContextDestroyed/Created events

RESOLVED FIXED

Status

enhancement
P1
normal
RESOLVED FIXED
2 months ago
Last month

People

(Reporter: ochameau, Assigned: ochameau)

Tracking

(Blocks 4 bugs)

Details

Attachments

(1 attachment)

Assignee

Description

2 months ago

Bug 1543095 and bug 1543098 are implementing events being fired by both Page and Runtime domains, but in an inderteministic order.

Whereas we expect to fire and receive these events in a precise order:

  • Runtime.executionContextDestroyed
  • Page.frameNavigated
  • Runtime.executionContextCreated

The issue is that both Page.navigated and Runtime.executionContextCreated are being fired out of DOMWindowCreated gecko event. The event into which they end up being fired depends on the order into which we call Runtime.enable and Page.enable. These enable methods are registering the DOMWindowCreated listeners.

Assignee

Updated

2 months ago
Type: defect → enhancement
Priority: -- → P2
Assignee

Updated

Last month
Assignee: poirot.alex → nobody
Assignee

Comment 1

Last month

This work blocks bugs 1543185, 1543151, 1545726 as they are all about using Runtime from another domain.
This work require coordination between Page and Runtime, so I'm expecting this to lay down the typical way two domain should interact between each others.

Assignee

Comment 3

Last month

I submitted a WIP that isn't correct. Instead of coordinating Page and Runtime, it depends on having both domains enabled.
It means that it breaks both domains if one of the two isn't enabled.

I would like to work on this as soon as I'm done with preliminary work related to Runtime, like bug 1548098.

Assignee

Updated

Last month
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Priority: P2 → P1
Attachment #9063287 - Attachment description: Bug 1548102 - Coordinate Page.frameNavigated and Runtime.executionContextDestroyed/Created events → Bug 1548102 - Coordinate Page.frameNavigated and Runtime.executionContextDestroyed/Created events.
Assignee

Comment 5

Last month

Another linux try run after addressing the review comments:
https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=246150003&revision=0bc183c318a15d209a7870b2ef911b536d85e21d

And a macos run to see if the added test fails on mac:
https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=246150003&revision=4b2b5f3872ba6e4ec340ea3280184d335c9fecf0
(with a few re-runs)

Note for the sheriffs, if this patch causes any intermittent on Mac, I would prefer to disable the test on this platform rather than backing this out.

Comment 6

Last month
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1bb020dacad9
Coordinate Page.frameNavigated and Runtime.executionContextDestroyed/Created events. r=remote-protocol-reviewers,ato

Comment 7

Last month
bugherder
Status: ASSIGNED → RESOLVED
Closed: Last month
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.