[JSC] Call custom accessors / values with their holder's global object
Created attachment 429120 [details] Patch
Created attachment 429495 [details] Patch Fix global object for non-reified properties, use CustomAccessor for JS built-ins, and add tests.
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
<rdar://problem/78541835>
Created attachment 430897 [details] Patch Rebase on top of relanded put() revamp.
That's really awesome.
Created attachment 431994 [details] WIP Introduce CallFrame::callerLexicalGlobalObject() and [CustomNativeFunctionAccessor] extended attribute to accomodate JSLocation setters, which need lexical global object to set document.referrer.
Created attachment 431995 [details] WIP Add missing Source/WebCore/bindings/js/JSLocationCustom.h file.
Created attachment 432455 [details] Patch Call CustomValue setters with correct realm as well, rework callerGlobalObject() to use vm.topCallFrame for custom accessors, revert changes to create_hash_table, and add tests.
Created attachment 432710 [details] Patch Fix --debug build, smsimplify callerGlobalObject(), add test for JSCustomSetterFunction passing correct referrer, and improve ChangeLog.
Created attachment 432711 [details] Patch svn add LayoutTests/imported
(In reply to Yusuke Suzuki from comment #6) > That's really awesome. Thanks! I would appreciate a review. Once we land this, implementing RegExpConstructor legacy features (https://bugs.webkit.org/show_bug.cgi?id=220233) would be so much easier.
Looks like a real regression in this test: http/tests/security/block-top-level-navigations-by-untrusted-first-party-iframes.html We should probably hold off on review until that is resolved.
Created attachment 432794 [details] Patch Attempt to retrieve VMEntryScope's global object even if vm.topCallFrame is nullptr, fixing the test regression, and make JSCustomSetterFunction test more sophisticated.
Comment on attachment 432794 [details] Patch r=me
Created attachment 434056 [details] Patch for landing
Created attachment 434099 [details] Patch for landing svn add <missing LayoutTest files>.
Comment on attachment 434099 [details] Patch for landing I'm putting r+ on my own patch (that was already reviewed by Yusuke (thanks!)) so the GitHub's WPT export bot mark my PR (https://github.com/web-platform-tests/wpt/pull/29767) as reviewed for me to land it.
Created attachment 434110 [details] Patch for landing Remove trailing whitespace from wpt/WebIDL/ecmascript-binding/global-object-implicit-this-value-cross-realm.html.
Committed r280256 (239923@main): <https://commits.webkit.org/239923@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434110 [details].