Commit 0ba03302 authored by marja@chromium.org's avatar marja@chromium.org

Follow-up to r19845 which suppresses syntax errors in presence of a stack overflow.

ReportUnexpectedToken already calls Traits::ReportMessageAt. If we're in Parser,
that already suppresses the syntax error. If we're in PreParser, we don't need
to suppress the syntax error (preparser errors don't go through Isolate, and
having both stack overflow and a syntax error present is handled correctly by
PreParserApi::PreParse).

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/197293003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d6f639bc
......@@ -1016,12 +1016,6 @@ 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()) {
return;
}
Scanner::Location source_location = scanner()->location();
// Four of the tokens are treated specially
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment