Index: Source/core/dom/MessagePort.cpp |
diff --git a/Source/core/dom/MessagePort.cpp b/Source/core/dom/MessagePort.cpp |
index 697f928f851e31b208be8ceb118a6cee0f80327b..a2b20aa923e79d61e76583be2478f53dca028041 100644 |
--- a/Source/core/dom/MessagePort.cpp |
+++ b/Source/core/dom/MessagePort.cpp |
@@ -32,7 +32,7 @@ |
#include "core/dom/ExceptionCode.h" |
#include "core/dom/MessageEvent.h" |
#include "core/page/DOMWindow.h" |
-#include "core/workers/WorkerContext.h" |
+#include "core/workers/WorkerGlobalScope.h" |
#include "wtf/text/AtomicString.h" |
namespace WebCore { |
@@ -162,7 +162,7 @@ void MessagePort::dispatchMessages() |
while (m_entangledChannel && m_entangledChannel->tryGetMessageFromRemote(message, channels)) { |
// close() in Worker onmessage handler should prevent next message from dispatching. |
- if (m_scriptExecutionContext->isWorkerContext() && static_cast<WorkerContext*>(m_scriptExecutionContext)->isClosing()) |
+ if (m_scriptExecutionContext->isWorkerGlobalScope() && static_cast<WorkerGlobalScope*>(m_scriptExecutionContext)->isClosing()) |
return; |
OwnPtr<MessagePortArray> ports = MessagePort::entanglePorts(*m_scriptExecutionContext, channels.release()); |