Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1121)

Unified Diff: src/preparser.h

Issue 197293003: Follow-up to r19845 which suppresses syntax errors in presence of a stack overflow. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698