Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index 59a9a6108aca239f12537e032eaa14cf4b5a3a74..1ac3c5b26ef7fbeb853a329a9c47d1cb7d813a20 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -1016,10 +1016,10 @@ ParserBase<Traits>::FunctionState::~FunctionState() { |
template<class Traits> |
void ParserBase<Traits>::ReportUnexpectedToken(Token::Value token) { |
- // We don't report stack overflows here, to avoid increasing the |
- // stack depth even further. Instead we report it after parsing is |
- // over, in ParseProgram. |
- if (token == Token::ILLEGAL && stack_overflow()) { |
+ if (stack_overflow()) { |
Michael Starzinger
2014/03/12 13:45:08
All cases below call through to ReportMessageAt, w
marja
2014/03/12 13:50:40
Done; updated description to explain in detail why
|
+ // Suppress the error message in the presence of a stack overflow. The |
+ // isolate allows only one pending exception at at time and we want to |
+ // report the stack overflow later. |
return; |
} |
Scanner::Location source_location = scanner()->location(); |