gecko-dev/dom/push
Nikhil Marathe 84fedf8359 Bug 1190661 - Send push only to child processes when in e10s mode. r=smaug
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
2015-07-30 20:00:21 -07:00
..
test Bug 1189543 - `pushManager.getSubscription()` should return `null` for nonexistent push subscriptions in workers. r=nsm 2015-08-04 13:43:23 -07:00
Push.js Bug 1184574 - Allow access to PushManager on ServiceWorker. r=kitcambridge,smaug,catalinb 2015-07-23 08:30:15 -07:00
Push.manifest Bug 1184574 - Allow access to PushManager on ServiceWorker. r=kitcambridge,smaug,catalinb 2015-07-23 08:30:15 -07:00
PushClient.js Bug 1184574 - Allow access to PushManager on ServiceWorker. r=kitcambridge,smaug,catalinb 2015-07-23 08:30:15 -07:00
PushDB.jsm Bug 1188686 - Clear push subscriptions when forgetting about site. r=kitcambridge 2015-07-29 11:33:48 -07:00
PushManager.cpp Bug 1189543 - `pushManager.getSubscription()` should return `null` for nonexistent push subscriptions in workers. r=nsm 2015-08-04 13:43:23 -07:00
PushManager.h Bug 1188091 - Fix the exposure of Push interfaces; r=dougt,bzbarsky,nsm 2015-07-30 01:06:38 -04:00
PushNotificationService.js Bug 1188686 - Clear push subscriptions when forgetting about site. r=kitcambridge 2015-07-29 11:33:48 -07:00
PushRecord.jsm Bug 1153504 - Add per-origin push quotas. r=nsm,mt,markh 2015-06-25 14:52:57 -07:00
PushService.jsm Bug 1190661 - Send push only to child processes when in e10s mode. r=smaug 2015-07-30 20:00:21 -07:00
PushServiceChildPreload.jsm Bug 1190661 - Send push only to child processes when in e10s mode. r=smaug 2015-07-30 20:00:21 -07:00
PushServiceHttp2.jsm Bug 1153504 - Add per-origin push quotas. r=nsm,mt,markh 2015-06-25 14:52:57 -07:00
PushServiceWebSocket.jsm Bug 1167132 - Part 10: [NetworkManager] Move network information into a separate interface (PushService). r=nsm 2015-07-29 02:11:00 -04:00
moz.build Bug 1184574 - Allow access to PushManager on ServiceWorker. r=kitcambridge,smaug,catalinb 2015-07-23 08:30:15 -07:00