Changeset 269931 in webkit


Ignore:
Timestamp:
Nov 17, 2020 3:53:49 PM (3 years ago)
Author:
sbarati@apple.com
Message:

Add more info to the RELEASE_ASSERT inside Parser::parseInner
https://bugs.webkit.org/show_bug.cgi?id=219054
<rdar://problem/71506453>

Reviewed by Mark Lam.

We have some crashes here, and it'll be helpful for the crashlogs to have
more info in the register state.

  • parser/Lexer.h:

(JSC::Lexer::codeLength):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r269929 r269931  
     12020-11-17  Saam Barati  <sbarati@apple.com>
     2
     3        Add more info to the RELEASE_ASSERT inside Parser::parseInner
     4        https://bugs.webkit.org/show_bug.cgi?id=219054
     5        <rdar://problem/71506453>
     6
     7        Reviewed by Mark Lam.
     8
     9        We have some crashes here, and it'll be helpful for the crashlogs to have
     10        more info in the register state.
     11
     12        * parser/Lexer.h:
     13        (JSC::Lexer::codeLength):
     14        * parser/Parser.cpp:
     15        (JSC::Parser<LexerType>::parseInner):
     16
    1172020-11-17  Sergey Rubanov  <chi187@gmail.com>
    218
  • trunk/Source/JavaScriptCore/parser/Lexer.h

    r266681 r269931  
    126126    }
    127127
     128    size_t codeLength() { return m_codeEnd - m_codeStart; }
     129
    128130private:
    129131    void record8(int);
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r269922 r269931  
    229229
    230230        if (SourceParseModeSet(SourceParseMode::ArrowFunctionMode, SourceParseMode::AsyncArrowFunctionMode).contains(parseMode) && !hasError()) {
    231             // The only way we could have an error wile reparsing is if we run out of stack space.
    232             RELEASE_ASSERT(match(ARROWFUNCTION));
     231            // The only way we could have an error while reparsing is if we run out of stack space.
     232            RELEASE_ASSERT(match(ARROWFUNCTION), m_token.m_type, static_cast<uint8_t>(parseMode), m_lexer->currentOffset(), m_lexer->codeLength());
    233233            next();
    234234            isArrowFunctionBodyExpression = !match(OPENBRACE);
Note: See TracChangeset for help on using the changeset viewer.