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

Unified Diff: gin/v8_platform.cc

Issue 2610473002: Use TaskScheduler instead of WorkerPool in v8_platform.cc. (Closed)
Patch Set: Blink test environment 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 | « gin/test/v8_test.h ('k') | mojo/edk/js/tests/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/v8_platform.cc
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
index 6e5491bff11801397e353cb371b1a9762fffb970..44f8dd8c8fd781f263d806ee3410003f4e545d49 100644
--- a/gin/v8_platform.cc
+++ b/gin/v8_platform.cc
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/sys_info.h"
-#include "base/threading/worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "base/trace_event/trace_event.h"
#include "gin/per_isolate_data.h"
@@ -67,10 +67,10 @@ size_t V8Platform::NumberOfAvailableBackgroundThreads() {
void V8Platform::CallOnBackgroundThread(
v8::Task* task,
v8::Platform::ExpectedRuntime expected_runtime) {
- base::WorkerPool::PostTask(
- FROM_HERE,
- base::Bind(&v8::Task::Run, base::Owned(task)),
- expected_runtime == v8::Platform::kLongRunningTask);
+ base::PostTaskWithTraits(
+ FROM_HERE, base::TaskTraits().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
+ base::Bind(&v8::Task::Run, base::Owned(task)));
}
void V8Platform::CallOnForegroundThread(v8::Isolate* isolate, v8::Task* task) {
« no previous file with comments | « gin/test/v8_test.h ('k') | mojo/edk/js/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698