Commit 505b6020 authored by yangguo's avatar yangguo Committed by Commit bot

Catch graceful failures when deserializing in d8.

R=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/917653002

Cr-Commit-Position: refs/heads/master@{#26579}
parent 5d1a9b09
......@@ -249,10 +249,13 @@ Local<Script> Shell::CompileString(
DCHECK(false); // A new compile option?
}
if (data == NULL) compile_options = ScriptCompiler::kNoCompileOptions;
return source_type == SCRIPT
? ScriptCompiler::Compile(isolate, &cached_source, compile_options)
: ScriptCompiler::CompileModule(isolate, &cached_source,
compile_options);
Local<Script> result =
source_type == SCRIPT
? ScriptCompiler::Compile(isolate, &cached_source, compile_options)
: ScriptCompiler::CompileModule(isolate, &cached_source,
compile_options);
CHECK(data == NULL || !data->rejected);
return result;
}
......
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