Closed
Bug 1514844
Opened 5 years ago
Closed 5 years ago
Make notifications work with parent intercept enabled
Categories
(Core :: DOM: Push Subscriptions, enhancement)
Core
DOM: Push Subscriptions
Tracking
()
RESOLVED
FIXED
mozilla66
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: mrbkap, Assigned: mrbkap)
References
Details
Attachments
(2 files)
Running mochitests with parent-intercept enabled fails in some of the notification tests. It looks like there are two problems: 1. For click and close notifications, we try to access the ServiceWorkerManager in the child process. We need to ask the parent process to do that work for us. 2. The notification code currently stores a global database of notifications in the parent as well as a per-process in-memory cache. Because we now can have service workers running in a different process from at least one of the clients that needs to see the notifications, the per-process cache is no longer viable (as an aside, I think the current code was wrong, even without service workers. By my reading of the spec, two same-origin pages should share the same "tagged" notifications even if they're in different processes. The current code gets that wrong).
Assignee | ||
Comment 1•5 years ago
|
||
The current code assumes that it can get the ServiceWorkerManager in the child process to send a message to the proper service worker. That isn't true, we need to ask the parent to do it for us.
Assignee | ||
Comment 2•5 years ago
|
||
This assumes that all of the notifications for a given origin must be in the same process. With this patch, we'll always go back to the parent process to get the notifications. Up next is limiting our search in the parent process to only the notifications we're looking for. Depends on D14773
Pushed by mrbkap@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c30fafd98c6f Fix notification events in service workers. r=asuth https://hg.mozilla.org/integration/autoland/rev/c4eb9f94bc4c Remove the per-process notification cache. r=asuth
Comment 4•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c30fafd98c6f https://hg.mozilla.org/mozilla-central/rev/c4eb9f94bc4c
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in
before you can comment on or make changes to this bug.
Description
•