Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2534803002: Move InspectorTask handling from MainThreadTaskRunner to Document (Closed)
Patch Set: s/wrapWeakPersistent/wrapCrossThreadWeakPersistent/ Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/MainThreadTaskRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698