| Index: third_party/WebKit/Source/core/dom/MessagePort.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/MessagePort.cpp b/third_party/WebKit/Source/core/dom/MessagePort.cpp
|
| index fca2b56427bd6fd9cf1479770643a502f63b39b0..655e09e3a11c1f14c056a97c029c6d362a791951 100644
|
| --- a/third_party/WebKit/Source/core/dom/MessagePort.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/MessagePort.cpp
|
| @@ -33,6 +33,7 @@
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/dom/ExecutionContext.h"
|
| #include "core/dom/ExecutionContextTask.h"
|
| +#include "core/dom/TaskRunnerHelper.h"
|
| #include "core/events/MessageEvent.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| #include "core/workers/WorkerGlobalScope.h"
|
| @@ -126,8 +127,10 @@ WebMessagePortChannelUniquePtr MessagePort::disentangle() {
|
| // access mutable variables).
|
| void MessagePort::messageAvailable() {
|
| DCHECK(getExecutionContext());
|
| + // TODO(tzik): Use ParentThreadTaskRunners instead of ExecutionContext here to
|
| + // avoid touching foreign thread GCed object.
|
| getExecutionContext()->postTask(
|
| - BLINK_FROM_HERE,
|
| + TaskType::PostedMessage, BLINK_FROM_HERE,
|
| createCrossThreadTask(&MessagePort::dispatchMessages,
|
| wrapCrossThreadWeakPersistent(this)));
|
| }
|
|
|