[webkit-changes] [WebKit/WebKit] 866102: [JSC] add JSFunction::nameWithoutGC
Yusuke Suzuki
noreply at github.com
Sat May 20 19:25:30 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8661025c07ae37a7fecab656ea5d5fce16c2c293
https://github.com/WebKit/WebKit/commit/8661025c07ae37a7fecab656ea5d5fce16c2c293
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-05-20 (Sat, 20 May 2023)
Changed paths:
A JSTests/stress/error-bound-function.js
M Source/JavaScriptCore/runtime/JSBoundFunction.cpp
M Source/JavaScriptCore/runtime/JSBoundFunction.h
M Source/JavaScriptCore/runtime/JSFunction.cpp
M Source/JavaScriptCore/runtime/JSFunction.h
Log Message:
-----------
[JSC] add JSFunction::nameWithoutGC
https://bugs.webkit.org/show_bug.cgi?id=257091
rdar://109614514
Reviewed by Keith Miller.
This patch does not change the production behavior, but it adds JSFunction::nameWithoutGC
to make it extra robust against ErrorInstance's stack cleaning up in GC end phase, which
must not cause any GC activity. Right now, JSBoundFunction::name can cause GC, but JSBoundFunction
was never listed in the error stack (so there is no problem), but let's make this invariant
clear for ErrorInstance to defend against the future possible extension.
* JSTests/stress/error-bound-function.js: Added.
(throwing):
(test):
(calling):
(i.catch):
* Source/JavaScriptCore/runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::nameStringWithoutGCSlow):
* Source/JavaScriptCore/runtime/JSBoundFunction.h:
* Source/JavaScriptCore/runtime/JSFunction.cpp:
(JSC::JSFunction::nameWithoutGC):
(JSC::getCalculatedDisplayName):
* Source/JavaScriptCore/runtime/JSFunction.h:
Canonical link: https://commits.webkit.org/264299@main
More information about the webkit-changes
mailing list