[webkit-reviews] review granted: [Bug 126004] Implement ArrayBuffer.isView : [Attachment 219690] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 19 16:12:12 PST 2013
Filip Pizlo <fpizlo at apple.com> has granted review:
Bug 126004: Implement ArrayBuffer.isView
https://bugs.webkit.org/show_bug.cgi?id=126004
Attachment 219690: Patch
https://bugs.webkit.org/attachment.cgi?id=219690&action=review
------- Additional Comments from Filip Pizlo <fpizlo at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=219690&action=review
R=me unless Oliver has super strong opinions about that macro.
>>> Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp:56
>>> + putDirectNativeFunction(vm, globalObject(), makeIdentifier(vm,
("isView")), 1, arrayBufferFuncIsView, NoIntrinsic, DontEnum |Function);
>>
>> JSC_NATIVE_FUNCTION(vm.propertyNames->isView, arrayBufferFuncIsView,
DontEnum, 1);
>>
>> Add isView to CommonIdentifiers
>
> I tried using JSC_NATIVE_FUNCTION, but it assumes "globalObject" is defined
in the current scope (except as a function), so the macro gives a syntax error.
Yeah, other places that use JSC_NATIVE_FUNCTION often have some pro-forma setup
like:
JSGlobalObject* globalObject = prototype->globalObjects();
Or whatever is appropriate.
I don't mind that you're calling putDirectNativeFunction directly. But, you
should add isView to CommonIdentifiers. Then you'll access it by saying
vm.propertyNames->isView. This isn't a big deal, but it's nice to be
consistent.
More information about the webkit-reviews
mailing list