Title: [269931] trunk/Source/_javascript_Core
- Revision
- 269931
- Author
- sbar...@apple.com
- Date
- 2020-11-17 15:53:49 -0800 (Tue, 17 Nov 2020)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (269930 => 269931)
--- trunk/Source/_javascript_Core/ChangeLog 2020-11-17 23:51:11 UTC (rev 269930)
+++ trunk/Source/_javascript_Core/ChangeLog 2020-11-17 23:53:49 UTC (rev 269931)
@@ -1,3 +1,19 @@
+2020-11-17 Saam Barati <sbar...@apple.com>
+
+ 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-17 Sergey Rubanov <chi...@gmail.com>
Add support for the Wasm i32 sign-extension-ops proposal
Modified: trunk/Source/_javascript_Core/parser/Lexer.h (269930 => 269931)
--- trunk/Source/_javascript_Core/parser/Lexer.h 2020-11-17 23:51:11 UTC (rev 269930)
+++ trunk/Source/_javascript_Core/parser/Lexer.h 2020-11-17 23:53:49 UTC (rev 269931)
@@ -125,6 +125,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: trunk/Source/_javascript_Core/parser/Parser.cpp (269930 => 269931)
--- trunk/Source/_javascript_Core/parser/Parser.cpp 2020-11-17 23:51:11 UTC (rev 269930)
+++ trunk/Source/_javascript_Core/parser/Parser.cpp 2020-11-17 23:53:49 UTC (rev 269931)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes