...
Created attachment 273207 [details] patch
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.
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?
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.
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(.).
Comment on attachment 273207 [details] patch r=me
thanks for the review. Landed in: http://trac.webkit.org/changeset/197711