Closed Bug 1469941 Opened 7 years ago Closed 7 years ago

trigger service worker navigation update check when e10s pref is flipped

Categories

(Core :: DOM: Service Workers, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

Attachments

(1 file)

Currently we trigger our navigation update check from DOMContentLoaded in nsDocument by talking straight to the local process SWM. We need to make this send a message to the parent instead.
Comment on attachment 8986521 [details] [diff] [review] Note DOMContentLoaded on the ClientSource and trigger service worker update in appropriate process. r=mrbkap Blake, the service worker spec requires that the browser schedule an update check after every non-subresource load that results in a controlled client. By convention we do this some time period after the page loads. Chrome uses the load event to start and we have been using DOMContentLoaded. Our code that triggers this update check currently calls the local SWM directly from nsDocument.cpp when DOMContentLoaded is dispatched. Of course, this does not work properly in our new e10s architecture. This patch makes us send a message on the ClientSource when we reach DOMContentLoaded. We then trigger the SWM update call in the appropriate process based on how the pref is set.
Attachment #8986521 - Flags: review?(mrbkap)
Attachment #8986521 - Flags: review?(mrbkap) → review+
Pushed by bkelly@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3f78c17a1cea Note DOMContentLoaded on the ClientSource and trigger service worker update in appropriate process. r=mrbkap
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: