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); |
} |