Summary: | Partly implement Function.prototype.{caller,arguments} reflection proposal | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Claude Pache <claude.pache> | ||||||||
Component: | JavaScriptCore | Assignee: | Alexey Shvayka <ashvayka> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | ashvayka, erights, ews-watchlist, hi, keith_miller, leonardo.balter, ljharb, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Claude Pache
2016-05-26 05:09:24 PDT
I've observed this bug within a non directly related code: ``` (function() { 'use strict'; class Foo {} const a = new Proxy(function() {}, { ownKeys() { return Reflect.ownKeys(Foo) } }); console.log(Object.getOwnPropertySymbols(a)); })(); // strict mode, ok (function() { 'use sloppy'; class Foo {} const a = new Proxy(function() {}, { ownKeys() { return Reflect.ownKeys(Foo) } }); console.log(Object.getOwnPropertySymbols(a)); })(); ``` The code in sloppy mode breaks in Chrome and Safari because the function object will have non-configurable own properties arguments and caller and the Proxy trap is required to list all non-configurable properties from the Proxy target. Ping. What is the status of this? Created attachment 430793 [details]
Patch
(In reply to Alexey Shvayka from comment #3) > Created attachment 430793 [details] > Patch r278563 patch reflect-own-keys-function 45.4040+-0.8465 ^ 21.7507+-0.2064 ^ definitely 2.0875x faster function-prototype-get 39.7061+-0.9041 ^ 35.6181+-0.3754 ^ definitely 1.1148x faster <geometric> 42.4357+-0.6210 ^ 27.8294+-0.1872 ^ definitely 1.5248x faster Created attachment 430875 [details]
Patch
Adjust LayoutTests.
Created attachment 432853 [details]
Patch
Adjust put-to-proto-chain-overrides-put.js stress test.
Comment on attachment 432853 [details]
Patch
r=me
Comment on attachment 432853 [details]
Patch
I appreciate the review!
Committed r280289 (239947@main): <https://commits.webkit.org/239947@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 432853 [details]. |