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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc

Issue 2788013003: Expected Queueing Time Metric ignores tasks with nested message loops. (Closed)
Patch Set: Address nits Created 3 years, 9 months 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/platform/scheduler/base/task_queue_manager.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
index 49fd2f89237d79afa9f7c8a525b55e28f2b0f0fa..7a0de90fed81345d5cd54e7a021358fbd0e59aac 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
@@ -188,6 +188,12 @@ void TaskQueueManager::OnBeginNestedMessageLoop() {
any_thread().immediate_do_work_posted_count++;
any_thread().is_nested = true;
}
+
+ // When a nested message loop starts, task time observers may want to ignore
+ // the current task.
+ for (auto& observer : task_time_observers_)
+ observer.onBeginNestedMessageLoop();
+
delegate_->PostTask(FROM_HERE, immediate_do_work_closure_);
}

Powered by Google App Engine
This is Rietveld 408576698