Index: src/compiler.cc |
=================================================================== |
--- src/compiler.cc (revision 919) |
+++ src/compiler.cc (working copy) |
@@ -74,11 +74,6 @@ |
// Generate code and return it. |
Handle<Code> result = CodeGenerator::MakeCode(literal, script, is_eval); |
- // Check for stack-overflow exception. |
- if (result.is_null()) { |
- Top::StackOverflow(); |
- Top::ReportPendingMessages(); |
- } |
return result; |
} |
@@ -123,6 +118,8 @@ |
// Check for stack-overflow exceptions. |
if (code.is_null()) { |
+ Top::StackOverflow(); |
+ Top::ReportPendingMessages(); |
return Handle<JSFunction>::null(); |
} |
@@ -211,8 +208,6 @@ |
} |
} |
- if (result.is_null()) Top::ReportPendingMessages(); |
- |
return result; |
} |
@@ -243,8 +238,6 @@ |
} |
} |
- if (result.is_null()) Top::ReportPendingMessages(); |
- |
return result; |
} |
@@ -294,7 +287,10 @@ |
// Compile the code. |
Handle<Code> code = MakeCode(lit, script, false); |
+ // Check for stack-overflow exception. |
if (code.is_null()) { |
+ Top::StackOverflow(); |
+ Top::ReportPendingMessages(); |
return false; |
} |