This code races with the WeakWorkerRef shutdown code that sets both `mWorkerState` and `mWorkerPrivate` (though on different threads). This patch is based on the observation that except for failure cases, we can't get to `RuntimeServiceWorker::UnregisterWorker` without having already notified the `WorkerRef`s.
Differential Revision: https://phabricator.services.mozilla.com/D14176
--HG--
extra : moz-landing-system : lando
By taking an rvalue reference and using std::move more aggressively, we can
avoid at least two copies of these closures, which avoids a bit of atomic
refcounting.
Differential Revision: https://phabricator.services.mozilla.com/D14807
--HG--
extra : moz-landing-system : lando
This member was never changed after it was set, but it couldn't be const
because WorkerLoadInfo used a custom StealFrom() function instead of an
idiomatic move constructor and move assignment operator. This commit
replaces StealFrom with its idiomatic counterparts, adds a function that
determines a new worker's secure context status, and uses that function
to initialize the now const mIsSecureContext.
Making constant members const is part of a greater effort to ensure that
data is either modified from a single thread only, or access to it is
synchronized properly.
Differential Revision: https://phabricator.services.mozilla.com/D12030
--HG--
extra : moz-landing-system : lando
We only need to expose an intercept controller in SharedWorkers if we're on
the non-parent-intercept version of ServiceWorkers or if e10s is off.
nsDocShell already does this dance and we have to mirror it.
Differential Revision: https://phabricator.services.mozilla.com/D12490
--HG--
extra : moz-landing-system : lando
Add some memory usage information to the Performance counters and make everything asynchronous.
Differential Revision: https://phabricator.services.mozilla.com/D7984
--HG--
extra : moz-landing-system : lando
This member was never changed after it was set, but it couldn't be const
because WorkerLoadInfo used a custom StealFrom() function instead of an
idiomatic move constructor and move assignment operator. This commit
replaces StealFrom with its idiomatic counterparts, adds a function that
determines a new worker's secure context status, and uses that function
to initialize the now const mIsSecureContext.
Making constant members const is part of a greater effort to ensure that
data is either modified from a single thread only, or access to it is
synchronized properly.
Differential Revision: https://phabricator.services.mozilla.com/D12030
--HG--
extra : moz-landing-system : lando
In the next patch I get rid of the duplicated arguments.
Differential Revision: https://phabricator.services.mozilla.com/D11826
--HG--
extra : rebase_source : 2c21364406b9a757a78ae523e212a180f848ff9b
In order to fix the problem mentioned in comment 91 & co, we need to hold onto
the URI object that we resolve in the child process when we construct the
SharedWorker. Otherwise, we risk the Blob getting deallocated from under us.
This patch isn't sufficient to fix that problem, however, because the worker
code itself ends up going back through strings. I fix that in the next couple
of patches.
Differential Revision: https://phabricator.services.mozilla.com/D11825
--HG--
extra : rebase_source : c77854f00c0d7a102e73e0c81f59cc217f43fd69
This separates out the parent process from the list of child processes and
makes our handling of non-e10s more explicit.
Differential Revision: https://phabricator.services.mozilla.com/D11824
--HG--
extra : rebase_source : 3d4a5c5b427a5ad709468b4063793cb7bce27117
This implements the behavior that as long as there's one non-frozen or
non-suspended actor, we resume or thaw the manager.
Differential Revision: https://phabricator.services.mozilla.com/D11822
--HG--
extra : rebase_source : d5dd0e87581c94b383f1e155b03f63398b2a14a7