summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSFunction.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/JavaScriptCore/runtime/JSFunction.h
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSFunction.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSFunction.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/JavaScriptCore/runtime/JSFunction.h b/Source/JavaScriptCore/runtime/JSFunction.h
index 288181060..5553115bf 100644
--- a/Source/JavaScriptCore/runtime/JSFunction.h
+++ b/Source/JavaScriptCore/runtime/JSFunction.h
@@ -24,6 +24,7 @@
#ifndef JSFunction_h
#define JSFunction_h
+#include "InternalFunction.h"
#include "JSObject.h"
namespace JSC {
@@ -54,8 +55,7 @@ namespace JSC {
public:
typedef JSNonFinalObject Base;
- JS_EXPORT_PRIVATE static JSFunction* create(ExecState*, JSGlobalObject*, int length, const Identifier& name, NativeFunction nativeFunction, NativeFunction nativeConstructor = callHostFunctionAsConstructor);
- static JSFunction* create(ExecState*, JSGlobalObject*, int length, const Identifier& name, NativeExecutable* nativeExecutable);
+ JS_EXPORT_PRIVATE static JSFunction* create(ExecState*, JSGlobalObject*, int length, const Identifier& name, NativeFunction nativeFunction, Intrinsic = NoIntrinsic, NativeFunction nativeConstructor = callHostFunctionAsConstructor);
static JSFunction* create(ExecState* exec, FunctionExecutable* executable, ScopeChainNode* scopeChain)
{
@@ -154,12 +154,9 @@ namespace JSC {
WriteBarrier<ScopeChainNode> m_scopeChain;
};
- JSFunction* asFunction(JSValue);
-
- inline JSFunction* asFunction(JSValue value)
+ inline bool JSValue::isFunction() const
{
- ASSERT(asObject(value)->inherits(&JSFunction::s_info));
- return static_cast<JSFunction*>(asObject(value));
+ return isCell() && (asCell()->inherits(&JSFunction::s_info) || asCell()->inherits(&InternalFunction::s_info));
}
} // namespace JSC