Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index 2217f23e58977fd47b4d730bcd3b51e768f132e2..74ee087e0f4b3b146a860fcfbe2f3622bd93b310 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -764,8 +764,6 @@ FunctionLiteral* Parser::ParseLazy(Handle<SharedFunctionInfo> info, |
RelocInfo::kNoPosition, type, &ok); |
// Make sure the results agree. |
ASSERT(ok == (result != NULL)); |
- // The only errors should be stack overflows. |
- ASSERT(ok || stack_overflow_); |
} |
// Make sure the target stack is empty. |
@@ -774,8 +772,8 @@ FunctionLiteral* Parser::ParseLazy(Handle<SharedFunctionInfo> info, |
// If there was a stack overflow we have to get rid of AST and it is |
// not safe to do before scope has been deleted. |
if (result == NULL) { |
- Top::StackOverflow(); |
zone_scope->DeleteOnExit(); |
+ if (stack_overflow_) Top::StackOverflow(); |
} else { |
Handle<String> inferred_name(info->inferred_name()); |
result->set_inferred_name(inferred_name); |