Commit 1d40f819 authored by marja's avatar marja Committed by Commit bot

Add a command line flag to disable streaming.

It's useful for debugging / analytics purposes, since we can force all
parsing to happen on a foreground thread.

BUG=

Review-Url: https://codereview.chromium.org/2386123006
Cr-Commit-Position: refs/heads/master@{#39977}
parent 83a93560
......@@ -2215,6 +2215,9 @@ Local<Function> ScriptCompiler::CompileFunctionInContext(
ScriptCompiler::ScriptStreamingTask* ScriptCompiler::StartStreamingScript(
Isolate* v8_isolate, StreamedSource* source, CompileOptions options) {
if (!i::FLAG_script_streaming) {
return nullptr;
}
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
return new i::BackgroundParsingTask(source->impl(), options,
i::FLAG_stack_size, isolate);
......
......@@ -591,6 +591,9 @@ DEFINE_MAYBE_BOOL(enable_armv8, "deprecated (use --arm_arch instead)")
DEFINE_BOOL(enable_regexp_unaligned_accesses, true,
"enable unaligned accesses for the regexp engine")
// api.cc
DEFINE_BOOL(script_streaming, true, "enable parsing on background")
// bootstrapper.cc
DEFINE_STRING(expose_natives_as, NULL, "expose natives in global object")
DEFINE_STRING(expose_debug_as, NULL, "expose debug in global object")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment