Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1566)

Unified Diff: Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 1310843006: Pass the v8::Context through the willDestroyServiceWorkerContextOnWorkerThread event. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index f48c98e9006739b2aba2ffb624b8e25aa95eb5e7..22363c329e752e69045d518602631a406d35650d 100644
--- a/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -39,6 +39,7 @@
#include "core/events/MessageEvent.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/workers/WorkerGlobalScope.h"
+#include "core/workers/WorkerThread.h"
#include "modules/background_sync/SyncEvent.h"
#include "modules/background_sync/SyncRegistration.h"
#include "modules/fetch/Headers.h"
@@ -225,8 +226,9 @@ void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed()
void ServiceWorkerGlobalScopeProxy::willDestroyWorkerGlobalScope()
{
+ v8::HandleScope handleScope(m_workerGlobalScope->thread()->isolate());
+ m_client.willDestroyWorkerContext(m_workerGlobalScope->script()->context());
m_workerGlobalScope = nullptr;
- m_client.willDestroyWorkerContext();
}
void ServiceWorkerGlobalScopeProxy::workerThreadTerminated()
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | public/web/modules/serviceworker/WebServiceWorkerContextClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698