| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 77111a842e7d55e6aa4a7ea8dfa02635ee431f3c..54f52fc77ba8ad104f0cfd5d9d281dc31f2e4cf8 100755
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -289,6 +289,11 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
|
| HGraphBuilder builder(&oracle);
|
| HPhase phase(HPhase::kTotal);
|
| HGraph* graph = builder.CreateGraph(info);
|
| + if (Top::has_pending_exception()) {
|
| + info->SetCode(Handle<Code>::null());
|
| + return false;
|
| + }
|
| +
|
| if (graph != NULL && FLAG_build_lithium) {
|
| Handle<Code> code = graph->Compile();
|
| if (!code.is_null()) {
|
| @@ -608,7 +613,9 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
|
|
|
| // Compile the code.
|
| if (!MakeCode(info)) {
|
| - Top::StackOverflow();
|
| + if (!Top::has_pending_exception()) {
|
| + Top::StackOverflow();
|
| + }
|
| } else {
|
| ASSERT(!info->code().is_null());
|
| Handle<Code> code = info->code();
|
|
|