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()) |