Fixed SEGV that could happen if an exception is thrown during bootstrapping.
authorishell <ishell@chromium.org>
Mon, 18 May 2015 15:50:38 +0000 (08:50 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 18 May 2015 15:50:26 +0000 (15:50 +0000)
BUG=chromium:487974
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28453}

src/bootstrapper.cc

index 21f3ec0..713dbb3 100644 (file)
@@ -1495,6 +1495,7 @@ bool Genesis::CompileNative(Isolate* isolate, Vector<const char> name,
   Handle<SharedFunctionInfo> function_info = Compiler::CompileScript(
       source, script_name, 0, 0, false, false, Handle<Object>(), context, NULL,
       NULL, ScriptCompiler::kNoCompileOptions, NATIVES_CODE, false);
+  if (function_info.is_null()) return false;
 
   DCHECK(context->IsNativeContext());