Index: src/compiler-dispatcher/compiler-dispatcher.cc |
diff --git a/src/compiler-dispatcher/compiler-dispatcher.cc b/src/compiler-dispatcher/compiler-dispatcher.cc |
index 5cf10aa3eb8ac012143c4f4b486d0e69c3bcfc1c..1b639fe9b0ad7035969b993a2253397461fa595c 100644 |
--- a/src/compiler-dispatcher/compiler-dispatcher.cc |
+++ b/src/compiler-dispatcher/compiler-dispatcher.cc |
@@ -110,8 +110,6 @@ |
} |
bool CompilerDispatcher::Enqueue(Handle<SharedFunctionInfo> function) { |
- if (!IsEnabled()) return false; |
- |
// We only handle functions (no eval / top-level code / wasm) that are |
// attached to a script. |
if (!function->script()->IsScript() || !function->is_function() || |
@@ -129,11 +127,6 @@ |
return true; |
} |
-bool CompilerDispatcher::IsEnabled() const { |
- v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate_); |
- return FLAG_compiler_dispatcher && platform_->IdleTasksEnabled(v8_isolate); |
-} |
- |
bool CompilerDispatcher::IsEnqueued(Handle<SharedFunctionInfo> function) const { |
return GetJobFor(function) != jobs_.end(); |
} |
@@ -190,7 +183,7 @@ |
void CompilerDispatcher::ScheduleIdleTaskIfNeeded() { |
v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate_); |
- DCHECK(platform_->IdleTasksEnabled(v8_isolate)); |
+ if (!platform_->IdleTasksEnabled(v8_isolate)) return; |
if (idle_task_scheduled_) return; |
if (jobs_.empty()) return; |
idle_task_scheduled_ = true; |