WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155099
[ES6] Implement Proxy.[[GetPrototypeOf]]
https://bugs.webkit.org/show_bug.cgi?id=155099
Summary
[ES6] Implement Proxy.[[GetPrototypeOf]]
Saam Barati
Reported
2016-03-06 16:04:58 PST
...
Attachments
patch
(17.41 KB, patch)
2016-03-07 13:53 PST
,
Saam Barati
mark.lam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2016-03-07 13:53:31 PST
Created
attachment 273207
[details]
patch
WebKit Commit Bot
Comment 2
2016-03-07 13:55:37 PST
Attachment 273207
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/ProxyObject.cpp:1051: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/runtime/ProxyObject.cpp:1053: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mark Lam
Comment 3
2016-03-07 14:11:03 PST
Comment on
attachment 273207
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273207&action=review
> Source/JavaScriptCore/runtime/ProxyObject.cpp:1035 > + if (handlerValue.isNull()) { > + throwVMTypeError(exec, ASCIILiteral("Proxy 'handler' is null. It should be an Object.")); > + return JSValue(); > + }
The only way to get to performGetPrototype() is thru performProxyGet(). The only way to get to performProxyGet() is thru ProxyObject::getOwnPropertySlotCommon() returning a slot getter. And ProxyObject::getOwnPropertySlotCommon() can only be called on a ProxyObject. Hence, shouldn't this be an assert instead?
Mark Lam
Comment 4
2016-03-07 14:21:00 PST
Comment on
attachment 273207
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273207&action=review
>> Source/JavaScriptCore/runtime/ProxyObject.cpp:1035 >> + } > > The only way to get to performGetPrototype() is thru performProxyGet(). The only way to get to performProxyGet() is thru ProxyObject::getOwnPropertySlotCommon() returning a slot getter. And ProxyObject::getOwnPropertySlotCommon() can only be called on a ProxyObject. Hence, shouldn't this be an assert instead?
My mistake. I didn't see the call from ProxyObject::getPrototype() below.
Saam Barati
Comment 5
2016-03-07 14:24:21 PST
I spoke with Mark in person. For posterity: calls to "proxy.__proto__" will route through performProxyGet. Reflect/Object.getOwnPrototype will call straight through to the method table implementation which calls through to performProxyGet(.).
Mark Lam
Comment 6
2016-03-07 14:51:21 PST
Comment on
attachment 273207
[details]
patch r=me
Saam Barati
Comment 7
2016-03-07 15:28:31 PST
thanks for the review. Landed in:
http://trac.webkit.org/changeset/197711
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug