gecko-dev/dom/workers
Andrew Sutherland dd7728004b Bug 1641715 - Normalize permission transmission. r=rpl
### Process Reuse

Prior to this patch, the logic was unintentionally specifying that
existing processes shouldn't be reused, which could lead to growing
the size of a process pool that we did not actually desire to grow.
We now pass the flag to request reuse of a process, which helps
compensate for the process selection decision process happening on
PBackground in a manner which inherently does not have as full an
understanding of what processes are in the act of being created on
the main thread.

See the comments in the code for more informationm.

### Permission Transmission

Prior to this patch, permissions would be transmitted when either:
1. The choice was made to use an existing process.
2. A new process was launched to be the home for a worker.

This seems like it covers all the bases but the actual mechanism by
which a remote worker would be launched for a new process is when its
RemoteWorkerServiceParent actor is registered.  The above would be
sufficient if the only way for processes to come into existence was at
the request of the RemoteWorkerService, but obviously this is not the
case.  When that happened, it would be possible for a remote worker to
be placed in a new process that was not the process we were
transmitting permissions for.

The changes in this patch normalize permission transmission so that
they are transmitted at the same time we attempt to spawn the worker
via the selected RemoteWorkerServiceParent.  This code path is used for
both an existing process and when a new process is spawned so there's
no longer any gap.

Differential Revision: https://phabricator.services.mozilla.com/D99753
2020-12-18 16:27:52 +00:00
..
remoteworkers Bug 1641715 - Normalize permission transmission. r=rpl 2020-12-18 16:27:52 +00:00
sharedworkers
test
ChromeWorker.cpp
ChromeWorker.h
ChromeWorkerScope.cpp
ChromeWorkerScope.h
JSExecutionManager.cpp
JSExecutionManager.h
JSSettings.h
MessageEventRunnable.cpp
MessageEventRunnable.h
Principal.cpp
Principal.h
Queue.h
RegisterBindings.cpp
RuntimeService.cpp
RuntimeService.h
ScriptLoader.cpp
ScriptLoader.h
Worker.cpp
Worker.h
WorkerCSPEventListener.cpp
WorkerCSPEventListener.h
WorkerCommon.h
WorkerDebugger.cpp
WorkerDebugger.h
WorkerDebuggerManager.cpp
WorkerDebuggerManager.h
WorkerError.cpp
WorkerError.h
WorkerEventTarget.cpp
WorkerEventTarget.h
WorkerLoadInfo.cpp
WorkerLoadInfo.h
WorkerLocation.cpp
WorkerLocation.h
WorkerNavigator.cpp
WorkerNavigator.h
WorkerPrivate.cpp
WorkerPrivate.h
WorkerRef.cpp
WorkerRef.h
WorkerRunnable.cpp
WorkerRunnable.h
WorkerScope.cpp Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika 2020-12-17 14:58:18 +00:00
WorkerScope.h
WorkerStatus.h
WorkerThread.cpp
WorkerThread.h
moz.build
nsIWorkerDebugger.idl
nsIWorkerDebuggerManager.idl