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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2445763002: Disallow posting tasks to SequencedWorkerPools by default. (Closed)
Patch Set: CR gab #57 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: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 8ea4bb12aade5984c278edfbd451a37fde8103f0..91a6f5028618395f91006dc4f15834e7f8e6e850 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -30,6 +30,7 @@
#include "base/strings/string_split.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/simple_thread.h"
#include "base/threading/thread_local.h"
#include "base/threading/thread_restrictions.h"
@@ -908,6 +909,13 @@ void RenderThreadImpl::Init(
is_renderer_suspended_ = false;
base::MemoryCoordinatorClientRegistry::GetInstance()->Register(this);
+
+ // If this renderer doesn't run inside the browser process, enable
+ // SequencedWorkerPool. Otherwise, it should already have been enabled.
+ // TODO(fdoray): Remove this once the SequencedWorkerPool to TaskScheduler
+ // redirection experiment concludes https://crbug.com/622400.
+ if (!command_line.HasSwitch(switches::kSingleProcess))
+ base::SequencedWorkerPool::EnableForProcess();
}
RenderThreadImpl::~RenderThreadImpl() {
« content/browser/browser_main_loop.cc ('K') | « content/public/test/browser_test_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698