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

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

Issue 2754673002: [scheduler] Split suspendable tq from unthrottled tq. (Closed)
Patch Set: For the moment make only database access tasks suspendable Created 3 years, 8 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/loader/EmptyClients.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 7ee88038c6ea4b3d289c0ca19eb814dbe9317a3e..f51d2373f5d83e990c02bca5754d2f5b8e99c570 100644
--- a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
+++ b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp
@@ -21,7 +21,6 @@ RefPtr<WebTaskRunner> TaskRunnerHelper::get(TaskType type, LocalFrame* frame) {
: Platform::current()->currentThread()->getWebTaskRunner();
case TaskType::UnspecedLoading:
case TaskType::Networking:
- case TaskType::DatabaseAccess:
return frame ? frame->frameScheduler()->loadingTaskRunner()
: Platform::current()->currentThread()->getWebTaskRunner();
// Throttling following tasks may break existing web pages, so tentatively
@@ -29,6 +28,9 @@ RefPtr<WebTaskRunner> TaskRunnerHelper::get(TaskType type, LocalFrame* frame) {
// TODO(nhiroki): Throttle them again after we're convinced that it's safe
// or provide a mechanism that web pages can opt-out it if throttling is not
// desirable.
+ case TaskType::DatabaseAccess:
+ return frame ? frame->frameScheduler()->suspendableTaskRunner()
+ : Platform::current()->currentThread()->getWebTaskRunner();
case TaskType::DOMManipulation:
case TaskType::UserInteraction:
case TaskType::HistoryTraversal:
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/EmptyClients.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698