RESOLVED FIXED Bug 81935
Add JSValue::isFunction
https://bugs.webkit.org/show_bug.cgi?id=81935
Summary Add JSValue::isFunction
Gavin Barraclough
Reported 2012-03-22 11:00:51 PDT
This would be useful in the WebCore bindings code. Also, rename asFunction to asJSFunction, since this only applies to JSFunctions.
Attachments
Fix (26.97 KB, patch)
2012-03-22 11:02 PDT, Gavin Barraclough
ggaren: review+
pnormand: commit-queue-
More better. (28.10 KB, patch)
2012-03-22 11:20 PDT, Gavin Barraclough
ggaren: review+
buildbot: commit-queue-
Gavin Barraclough
Comment 1 2012-03-22 11:02:12 PDT
Geoffrey Garen
Comment 2 2012-03-22 11:07:47 PDT
Comment on attachment 133295 [details] Fix 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.
Philippe Normand
Comment 3 2012-03-22 11:10:44 PDT
Early Warning System Bot
Comment 4 2012-03-22 11:16:48 PDT
Early Warning System Bot
Comment 5 2012-03-22 11:18:42 PDT
Gavin Barraclough
Comment 6 2012-03-22 11:20:01 PDT
Created attachment 133300 [details] More better.
Geoffrey Garen
Comment 7 2012-03-22 11:21:51 PDT
Comment on attachment 133300 [details] More better. r=me
Build Bot
Comment 8 2012-03-22 11:54:04 PDT
Comment on attachment 133300 [details] More better. Attachment 133300 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/12120115
Gavin Barraclough
Comment 9 2012-03-22 11:55:12 PDT
Fixed in r111739
Early Warning System Bot
Comment 10 2012-03-22 11:58:53 PDT
Comment on attachment 133300 [details] More better. Attachment 133300 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/12120122
Early Warning System Bot
Comment 11 2012-03-22 12:01:20 PDT
Comment on attachment 133300 [details] More better. Attachment 133300 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/12113166
Build Bot
Comment 12 2012-03-22 12:03:27 PDT
Comment on attachment 133300 [details] More better. Attachment 133300 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/12117157
Gustavo Noronha (kov)
Comment 13 2012-03-22 12:05:22 PDT
Comment on attachment 133300 [details] More better. Attachment 133300 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/12114150
Note You need to log in before you can comment on or make changes to this bug.