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

Unified Diff: Source/modules/serviceworkers/ServiceWorker.cpp

Issue 1156703003: ServiceWorker: Introduce ExtendableMessageEvent to replace MessageEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update Created 5 years, 5 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/modules/serviceworkers/ServiceWorker.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorker.cpp b/Source/modules/serviceworkers/ServiceWorker.cpp
index cdc4ba7921f3d6a9a3351df32a78aef2f408091c..393d80ab141b77ae58f16c630f91f14d297ba7ae 100644
--- a/Source/modules/serviceworkers/ServiceWorker.cpp
+++ b/Source/modules/serviceworkers/ServiceWorker.cpp
@@ -49,6 +49,8 @@ const AtomicString& ServiceWorker::interfaceName() const
void ServiceWorker::postMessage(ExecutionContext* context, PassRefPtr<SerializedScriptValue> message, const MessagePortArray* ports, ExceptionState& exceptionState)
{
+ if (m_wasStopped)
+ return;
// Disentangle the port in preparation for sending it to the remote context.
OwnPtr<MessagePortChannelArray> channels = MessagePort::disentanglePorts(context, ports, exceptionState);
if (exceptionState.hadException())

Powered by Google App Engine
This is Rietveld 408576698