Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 69ec4dddc261595fbf1c7d7acdcbc6dfbc1f49a9
https://github.com/WebKit/WebKit/commit/69ec4dddc261595fbf1c7d7acdcbc6dfbc1f49a9
Author: Kai Tamkun <[email protected]>
Date: 2026-05-28 (Thu, 28 May 2026)
Changed paths:
A JSTests/stress/out-of-memory-while-creating-undefined-variable-error.js
M Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
Log Message:
-----------
[JSC] Undefined variable error messages for extremely long variable names
shouldn't crash
https://bugs.webkit.org/show_bug.cgi?id=315603
rdar://176130438
Reviewed by Yusuke Suzuki.
This patch modifies a few error creation helper functions to use tryMakeString
instead of makeString and return a more generic message when it fails, which
can happen for variable names that are just below the string length limit.
Test: JSTests/stress/out-of-memory-while-creating-undefined-variable-error.js
* JSTests/stress/out-of-memory-while-creating-undefined-variable-error.js:
Added.
(catch):
* Source/JavaScriptCore/runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
(JSC::createErrorForDuplicateGlobalVariableDeclaration):
(JSC::createErrorForInvalidGlobalFunctionDeclaration):
(JSC::createErrorForInvalidGlobalVarDeclaration):
(JSC::createTDZError):
Canonical link: https://commits.webkit.org/314053@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications