зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1728326 - Notify WebExtensions internals when the background service worker is ready to be executed. r=asuth
This patch adds additional changes needed to notify, from WorkerPrivate ExecutionReady, the WebExtensions internals that a new background service worker is ready to be executed, and its related ExtensionWorkerContextChild should be created and initialized. Differential Revision: https://phabricator.services.mozilla.com/D124700
This commit is contained in:
Родитель
204a07cff7
Коммит
a053a7d451
|
@ -52,7 +52,7 @@
|
||||||
#include "mozilla/dom/WorkerBinding.h"
|
#include "mozilla/dom/WorkerBinding.h"
|
||||||
#include "mozilla/dom/JSExecutionManager.h"
|
#include "mozilla/dom/JSExecutionManager.h"
|
||||||
#include "mozilla/dom/WindowContext.h"
|
#include "mozilla/dom/WindowContext.h"
|
||||||
#include "mozilla/extensions/ExtensionBrowser.h" // extensions::CreateWorkerDestroyedRunnable
|
#include "mozilla/extensions/ExtensionBrowser.h" // extensions::Create{AndDispatchInitWorkerContext,WorkerDestroyed}Runnable
|
||||||
#include "mozilla/extensions/WebExtensionPolicy.h"
|
#include "mozilla/extensions/WebExtensionPolicy.h"
|
||||||
#include "mozilla/StorageAccess.h"
|
#include "mozilla/StorageAccess.h"
|
||||||
#include "mozilla/StoragePrincipalHelper.h"
|
#include "mozilla/StoragePrincipalHelper.h"
|
||||||
|
@ -3329,6 +3329,10 @@ void WorkerPrivate::ExecutionReady() {
|
||||||
}
|
}
|
||||||
|
|
||||||
data->mScope->MutableClientSourceRef().WorkerExecutionReady(this);
|
data->mScope->MutableClientSourceRef().WorkerExecutionReady(this);
|
||||||
|
|
||||||
|
if (ExtensionAPIAllowed()) {
|
||||||
|
extensions::CreateAndDispatchInitWorkerContextRunnable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorkerPrivate::InitializeGCTimers() {
|
void WorkerPrivate::InitializeGCTimers() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче