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}
This commit is contained in:
parent
5d1a9b09f3
commit
505b6020a8
11
src/d8.cc
11
src/d8.cc
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user