[webkit-reviews] review granted: [Bug 81935] Add JSValue::isFunction : [Attachment 133295] Fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 22 11:07:47 PDT 2012


Geoffrey Garen <ggaren at apple.com> has granted Gavin Barraclough
<barraclough at apple.com>'s request for review:
Bug 81935: Add JSValue::isFunction
https://bugs.webkit.org/show_bug.cgi?id=81935

Attachment 133295: Fix
https://bugs.webkit.org/attachment.cgi?id=133295&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=133295&action=review


r=me

> Source/JavaScriptCore/runtime/JSFunction.h:159
> +    inline JSFunction* asJSFunction(JSValue value)

Over time, I'd like us to move to the jsCast function template instead of
one-off casting functions. That would be a nice improvement here, but I won't
hold up this patch for it.

> Source/JavaScriptCore/runtime/JSFunction.h:167
> +	   return isObject() && (asObject(*this)->inherits(&JSFunction::s_info)
|| asObject(*this)->inherits(&InternalFunction::s_info));

I think isCell() is a better check here.


More information about the webkit-reviews mailing list