Title: [269961] branches/safari-610.3.7.1-branch/Source/_javascript_Core
Revision
269961
Author
[email protected]
Date
2020-11-18 08:58:02 -0800 (Wed, 18 Nov 2020)

Log Message

Cherry-pick r269931. rdar://problem/71540532

    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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269931 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-610.3.7.1-branch/Source/_javascript_Core/ChangeLog (269960 => 269961)


--- branches/safari-610.3.7.1-branch/Source/_javascript_Core/ChangeLog	2020-11-18 16:39:21 UTC (rev 269960)
+++ branches/safari-610.3.7.1-branch/Source/_javascript_Core/ChangeLog	2020-11-18 16:58:02 UTC (rev 269961)
@@ -1,3 +1,40 @@
+2020-11-18  Russell Epstein  <[email protected]>
+
+        Cherry-pick r269931. rdar://problem/71540532
+
+    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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-11-17  Saam Barati  <[email protected]>
+
+            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):
+
 2020-11-05  Alan Coon  <[email protected]>
 
         Cherry-pick r269338. rdar://problem/71021911

Modified: branches/safari-610.3.7.1-branch/Source/_javascript_Core/parser/Lexer.h (269960 => 269961)


--- branches/safari-610.3.7.1-branch/Source/_javascript_Core/parser/Lexer.h	2020-11-18 16:39:21 UTC (rev 269960)
+++ branches/safari-610.3.7.1-branch/Source/_javascript_Core/parser/Lexer.h	2020-11-18 16:58:02 UTC (rev 269961)
@@ -124,6 +124,8 @@
         return sourceProvider->getRange(token.m_location.startOffset, token.m_location.endOffset);
     }
 
+    size_t codeLength() { return m_codeEnd - m_codeStart; }
+
 private:
     void record8(int);
     void append8(const T*, size_t);

Modified: branches/safari-610.3.7.1-branch/Source/_javascript_Core/parser/Parser.cpp (269960 => 269961)


--- branches/safari-610.3.7.1-branch/Source/_javascript_Core/parser/Parser.cpp	2020-11-18 16:39:21 UTC (rev 269960)
+++ branches/safari-610.3.7.1-branch/Source/_javascript_Core/parser/Parser.cpp	2020-11-18 16:58:02 UTC (rev 269961)
@@ -228,8 +228,8 @@
             parameters = parseFunctionParameters(context, parseMode, functionInfo);
 
         if (SourceParseModeSet(SourceParseMode::ArrowFunctionMode, SourceParseMode::AsyncArrowFunctionMode).contains(parseMode) && !hasError()) {
-            // The only way we could have an error wile reparsing is if we run out of stack space.
-            RELEASE_ASSERT(match(ARROWFUNCTION));
+            // The only way we could have an error while reparsing is if we run out of stack space.
+            RELEASE_ASSERT(match(ARROWFUNCTION), m_token.m_type, static_cast<uint8_t>(parseMode), m_lexer->currentOffset(), m_lexer->codeLength());
             next();
             isArrowFunctionBodyExpression = !match(OPENBRACE);
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to