Source/JavaScriptCore:
JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
https://bugs.webkit.org/show_bug.cgi?id=144397
Reviewed by Andreas Kling.
Add the flag to JSTypeInfo. It's an inline flag so that it's fast to query. Slap the flag on
callback objects and internal functions. Modify the TypeOf operation to use this flag to avoid
making a getCallData() call if it isn't necessary.
* API/JSCallbackObject.h:
* runtime/InternalFunction.h:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::typeOfShouldCallGetCallData):
* runtime/Operations.cpp:
(JSC::jsTypeStringForValue):
* tests/stress/type-of-functions-and-objects.js: Added.
(foo):
(bar):
(baz):
(fuzz):
(expect):
(test):
Source/WebCore:
JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
https://bugs.webkit.org/show_bug.cgi?id=144397
Reviewed by Andreas Kling.
If you override getCallData() and you want to be called a "function", then you need to use the
new TypeOfShouldCallGetCallData flag.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bridge/objc/objc_runtime.h:
* bridge/runtime_method.h:
* bridge/runtime_object.h:
Source/WebKit2:
JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
https://bugs.webkit.org/show_bug.cgi?id=144397
Reviewed by Andreas Kling.
If you override getCallData() and you want to be called a "function", then you need to use the
new TypeOfShouldCallGetCallData flag.
* WebProcess/Plugins/Netscape/JSNPObject.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183575
268f45cc-cd09-0410-ab3c-
d52691b4dbfc