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

Unified Diff: third_party/WebKit/Source/core/workers/ThreadedWorklet.cpp

Issue 2845533002: Worklet: Move Worklet::Initialize() into ThreadedWorklet for cleanup (Closed)
Patch Set: fix test failures Created 3 years, 8 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: third_party/WebKit/Source/core/workers/ThreadedWorklet.cpp
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorklet.cpp b/third_party/WebKit/Source/core/workers/ThreadedWorklet.cpp
index ff5d4db291159872008199fb5ecb27439f1b9ad5..21b26cfe696d0f87ebdb3f833e741ddd89e6c6a1 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedWorklet.cpp
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorklet.cpp
@@ -67,6 +67,8 @@ void ThreadedWorklet::ContextDestroyed(ExecutionContext* execution_context) {
for (const auto& script_loader : loader_to_resolver_map_.Keys())
script_loader->Cancel();
loader_to_resolver_map_.clear();
+ if (IsInitialized())
+ GetWorkletGlobalScopeProxy()->TerminateWorkletGlobalScope();
Worklet::ContextDestroyed(execution_context);
}

Powered by Google App Engine
This is Rietveld 408576698