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:
Luca Greco 2021-11-05 20:27:00 +00:00
Родитель 204a07cff7
Коммит a053a7d451
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -52,7 +52,7 @@
#include "mozilla/dom/WorkerBinding.h"
#include "mozilla/dom/JSExecutionManager.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/StorageAccess.h"
#include "mozilla/StoragePrincipalHelper.h"
@ -3329,6 +3329,10 @@ void WorkerPrivate::ExecutionReady() {
}
data->mScope->MutableClientSourceRef().WorkerExecutionReady(this);
if (ExtensionAPIAllowed()) {
extensions::CreateAndDispatchInitWorkerContextRunnable();
}
}
void WorkerPrivate::InitializeGCTimers() {