Get rid of having users dispatch control runnables. It was error prone and
required too much reasoning. It was also possible to end up in a state where
callers would dispatch a WorkerRunnable, which would succeed, so they would not
dispatch a WorkerControlRunnable. Then the worker would stop Running,
canceling and releasing the runnable leading to releasing the proxy in an
unclean state. Instead, we AddRef() and add the feature and remove the feature
and Release() on Notify(). If callers successfully run a WorkerRunnable they
clean the proxy. If not, the proxy stays alive until the worker switches to
Canceling state.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
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.
Currently we don't check the dom.push.enabled pref in some cases for
some of these interfaces. This patch unifies how all of these
interfaces are exposed to Window, Worker, and ServiceWorker.
Currently we don't check the dom.push.enabled pref in some cases for
some of these interfaces. This patch unifies how all of these
interfaces are exposed to Window, Worker, and ServiceWorker.
Fix xpcshell tests.
Add support for webapps-clear-data.
Trash old regs on idb version upgrade.
Use principal for permission check.
use principal in PushSubscription.
Fix xpcshell tests.
Add support for webapps-clear-data.
Trash old regs on idb version upgrade.
Use principal for permission check.
use principal in PushSubscription.