| Index: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
|
| index e0a9d558acb65289bea90d605e977dbd72c2c208..ebae808087cf66ed33b0058781fb022bb7dde33d 100644
|
| --- a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
|
| @@ -262,16 +262,9 @@ void WebEmbeddedWorkerImpl::postMessageToPageInspector(const String& message) {
|
|
|
| void WebEmbeddedWorkerImpl::postTaskToLoader(
|
| const WebTraceLocation& location,
|
| - std::unique_ptr<ExecutionContextTask> task) {
|
| - // This cross-thread operation is brittle wrt per-thread heaps,
|
| - // posting a task to main-thread owned objects.
|
| + std::unique_ptr<WTF::CrossThreadClosure> task) {
|
| m_mainThreadTaskRunners->get(TaskType::Networking)
|
| - ->postTask(
|
| - BLINK_FROM_HERE,
|
| - crossThreadBind(
|
| - &ExecutionContextTask::performTaskIfContextIsValid,
|
| - WTF::passed(std::move(task)),
|
| - wrapCrossThreadWeakPersistent(m_mainFrame->frame()->document())));
|
| + ->postTask(BLINK_FROM_HERE, std::move(task));
|
| }
|
|
|
| void WebEmbeddedWorkerImpl::postTaskToWorkerGlobalScope(
|
| @@ -282,6 +275,10 @@ void WebEmbeddedWorkerImpl::postTaskToWorkerGlobalScope(
|
| m_workerThread->postTask(location, std::move(task));
|
| }
|
|
|
| +ExecutionContext* WebEmbeddedWorkerImpl::getLoaderExecutionContext() {
|
| + return m_mainFrame->frame()->document();
|
| +}
|
| +
|
| void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() {
|
| // Create 'shadow page', which is never displayed and is used mainly to
|
| // provide a context for loading on the main thread.
|
|
|