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

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

Issue 2669883003: Scheduler: Enqueue non-JS-timer tasks into the unthrottled task runner (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
diff --git a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
index f1ea1ac8812b6c4040cbe0708da612cce243d1d6..4fb1c65060423bb053e3e5cf18096f1c2e5dcd48 100644
--- a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
+++ b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
@@ -25,7 +25,6 @@ RefPtr<WebTaskRunner> TaskRunnerHelper::get(TaskType type, LocalFrame* frame) {
case TaskType::RemoteEvent:
case TaskType::WebSocket:
case TaskType::Microtask:
- case TaskType::PostedMessage:
case TaskType::UnshippedPortMessage:
case TaskType::FileReading:
case TaskType::DatabaseAccess:
@@ -41,6 +40,12 @@ RefPtr<WebTaskRunner> TaskRunnerHelper::get(TaskType type, LocalFrame* frame) {
case TaskType::Networking:
return frame ? frame->frameScheduler()->loadingTaskRunner()
: Platform::current()->currentThread()->getWebTaskRunner();
+ // We found throttling PostedMessage tasks may break existing web pages, so
+ // tentatively make it unthrottled.
+ // TODO(nhiroki): Consider to throttle this again maybe after making a
+ // mechanism that web pages can opt-out the throttling if throttling is not
+ // desirable.
+ case TaskType::PostedMessage:
nhiroki 2017/02/02 05:46:38 As my comment on the issue[1], I'm still not sure
altimin 2017/02/02 18:41:25 +1, I'm particularly interested in unthrottling We
Sami 2017/02/02 23:37:10 Yeah, this seems like a reasonable step for now. I
nhiroki 2017/02/03 15:07:34 Acknowledged.
nhiroki 2017/02/03 15:07:34 Acknowledged.
case TaskType::Unthrottled:
return frame ? frame->frameScheduler()->unthrottledTaskRunner()
: Platform::current()->currentThread()->getWebTaskRunner();
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698