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

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

Issue 1765493002: Revert of Make AbstractWorker a ContextLifecycleObserver rather than an ActiveDOMObject (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/SharedWorker.cpp
diff --git a/third_party/WebKit/Source/core/workers/SharedWorker.cpp b/third_party/WebKit/Source/core/workers/SharedWorker.cpp
index dbbd0dbb67fe7f0602050f9b4621ae0c88d92717..3f089e8cbc22cd445a50267f680f91e65bcf9fa7 100644
--- a/third_party/WebKit/Source/core/workers/SharedWorker.cpp
+++ b/third_party/WebKit/Source/core/workers/SharedWorker.cpp
@@ -67,6 +67,8 @@
OwnPtr<WebMessagePortChannel> remotePort = channel->port2()->disentangle();
ASSERT(remotePort);
+ worker->suspendIfNeeded();
+
// We don't currently support nested workers, so workers can only be created from documents.
Document* document = toDocument(context);
if (!document->securityOrigin()->canAccessSharedWorkers()) {

Powered by Google App Engine
This is Rietveld 408576698