• marja@chromium.org's avatar
    Parser: fix confusion when there are multiple errors to report. · b6996007
    marja@chromium.org authored
    (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
    
    Review URL: https://codereview.chromium.org/194713013
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    b6996007
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
include Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...