DescriptionParser: fix confusion when there are multiple errors to report.
(For more details, see bug.)
The problem occurs when a parsing function hits a stack overflow, but still
manages to return something meaningful. This happens because the call to
ParserBase::Next() which hits the stack overflow will still return a valid token
(the last token which we had already read), and only the next call after the
stack overflow will return INVALID. So for example ParseIdentifier will still
return a valid identifier even if we've hit a stack overflow.
In this case, some upper recursion level might detect and report a valid syntax
error, and then we bail out of the recursive descent because of the syntax
error. So we end up having both stack overflow and a syntax error present. When
we try to report the stack overflow after parsing (e.g., end of ParseLazy), the
isolate already has the syntax error as a pending exception, and a CHECK fails.
This fix suppresses the syntax errors in when a stack overflow has been
detected.
BUG=351335
LOG=N
R=mstarzinger@chromium.org
Committed: https://code.google.com/p/v8/source/detail?r=19845
Patch Set 1 #Patch Set 2 : rebased #
Messages
Total messages: 3 (0 generated)
|