зеркало из https://github.com/mozilla/gecko-dev.git
84fedf8359
Earlier, the in-process child process message manager and any content process child process message managers received the push event. This is because broadcastAsyncMessage is used, but on e10s we want ServiceWorkers to run in the child process, so the push should only be dispatched to it. This patch introduces a list of child process listeners in the PushService (running on the parent). PushServiceChildPreload sends a message to the PushService iff it is running in a child process. If there are non-zero child listeners, the PushService will send a message to all of them, otherwise it will fall back to broadcastAsyncMessage. We currently do not add support for precise targeting of child processes. This is because until Bug 1182117 is fixed, all child process ServiceWorkerManagers maintain all the service worker registrations internally. Yes this is a bug, but that is the way things are right now. This makes it impossible to distinguish which child should handle the notification for a given origin. Considering we don't ship multi-process e10s, I would like to land this right now. When Bug 1182117 is fixed, we can remove this code since the ServiceWorkerManager will manage registrations in the parent, and it will know which child process is running which ServiceWorker. --HG-- extra : commitid : Dgfkg4LqLPK extra : rebase_source : e64a4f1c757b05fe2939a338c1ad8d14f4015a90 |
||
---|---|---|
.. | ||
test | ||
Push.js | ||
Push.manifest | ||
PushClient.js | ||
PushDB.jsm | ||
PushManager.cpp | ||
PushManager.h | ||
PushNotificationService.js | ||
PushRecord.jsm | ||
PushService.jsm | ||
PushServiceChildPreload.jsm | ||
PushServiceHttp2.jsm | ||
PushServiceWebSocket.jsm | ||
moz.build |