Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Document.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
| index f5972c64070085e883e96563363867652c7fe6a3..df986638cb7382cb76395228eedac9967cd5f908 100644 |
| --- a/third_party/WebKit/Source/core/dom/Document.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp |
| @@ -5709,7 +5709,10 @@ void Document::postTask(const WebTraceLocation& location, |
| void Document::postInspectorTask(const WebTraceLocation& location, |
| std::unique_ptr<ExecutionContextTask> task) { |
| - m_taskRunner->postInspectorTask(location, std::move(task)); |
| + TaskRunnerHelper::get(TaskType::Internal, this) |
| + ->postTask(location, WTF::bind(&Document::performInspectorTask, |
| + wrapCrossThreadWeakPersistent(this), |
|
haraken
2016/11/28 11:00:43
Does this need to be cross-thread?
If this really
tzik
2016/11/29 01:52:38
Yes, this needs to be cross-thread. In addition, t
|
| + WTF::passed(std::move(task)))); |
| } |
| void Document::tasksWereSuspended() { |
| @@ -6516,6 +6519,11 @@ void Document::maybeRecordLoadReason(WouldLoadReason reason) { |
| m_wouldLoadReason = reason; |
| } |
| +void Document::performInspectorTask( |
| + std::unique_ptr<ExecutionContextTask> task) { |
| + task->performTask(this); |
| +} |
| + |
| DEFINE_TRACE_WRAPPERS(Document) { |
| visitor->traceWrappers(m_importsController); |
| visitor->traceWrappers(m_implementation); |