summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-09 07:31:01 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-09 07:31:01 (GMT)
commit6239633ad3ae2b707ebc491ec1453f791150dc1a (patch)
treecfce2e3d87e2e68bcbc7be581eaf6c5367f9b0a3 /src/script
parentf2e0f336183e8001f946da5b7aa45b9367ed68ba (diff)
downloadQt-6239633ad3ae2b707ebc491ec1453f791150dc1a.zip
Qt-6239633ad3ae2b707ebc491ec1453f791150dc1a.tar.gz
Qt-6239633ad3ae2b707ebc491ec1453f791150dc1a.tar.bz2
support callees that are not function objects
E.g. QScriptClass-based objects.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptcontextinfo.cpp2
-rw-r--r--src/script/api/qscriptvalue.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp
index 7f928ef..21c6341 100644
--- a/src/script/api/qscriptcontextinfo.cpp
+++ b/src/script/api/qscriptcontextinfo.cpp
@@ -129,7 +129,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
const QScriptContextPrivate *ctx_p = QScriptContextPrivate::get(context);
JSC::ExecState *frame = ctx_p->frame;
- JSC::InternalFunction *callee = frame->callee();
+ JSC::JSObject *callee = frame->callee();
if (callee && callee->isObject(&JSC::JSFunction::info)) {
functionType = QScriptContextInfo::ScriptFunction;
JSC::SourceProvider *source = frame->codeBlock()->source();
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index a120d9c..9fc860e 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -1922,7 +1922,7 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
newCallFrame[++dst] = *it;
newCallFrame += argc + JSC::RegisterFile::CallFrameHeaderSize;
// ### dst?
- newCallFrame->init(0, /*vPC=*/0, scopeChain, exec, dst, argc, JSC::asInternalFunction(callee));
+ newCallFrame->init(0, /*vPC=*/0, scopeChain, exec, dst, argc, JSC::asObject(callee));
result = callData.native.function(newCallFrame, JSC::asObject(callee), jscThisObject, jscArgs);
interp->registerFile().shrink(oldEnd);
}
@@ -2019,7 +2019,7 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
newCallFrame[++dst] = *it;
newCallFrame += argc + JSC::RegisterFile::CallFrameHeaderSize;
// ### dst?
- newCallFrame->init(0, /*vPC=*/0, scopeChain, exec, dst, argc, JSC::asInternalFunction(callee));
+ newCallFrame->init(0, /*vPC=*/0, scopeChain, exec, dst, argc, JSC::asObject(callee));
result = callData.native.function(newCallFrame, JSC::asObject(callee), jscThisObject, applyArgs);
interp->registerFile().shrink(oldEnd);
}
@@ -2096,7 +2096,7 @@ QScriptValue QScriptValue::construct(const QScriptValueList &args)
newCallFrame[++dst] = *it;
newCallFrame += argc + JSC::RegisterFile::CallFrameHeaderSize;
// ### dst?
- newCallFrame->init(0, /*vPC=*/0, scopeChain, exec, dst, argc, JSC::asInternalFunction(callee));
+ newCallFrame->init(0, /*vPC=*/0, scopeChain, exec, dst, argc, JSC::asObject(callee));
result = constructData.native.function(newCallFrame, JSC::asObject(callee), jscArgs);
interp->registerFile().shrink(oldEnd);
}
@@ -2178,7 +2178,7 @@ QScriptValue QScriptValue::construct(const QScriptValue &arguments)
newCallFrame[++dst] = *it;
newCallFrame += argc + JSC::RegisterFile::CallFrameHeaderSize;
// ### dst?
- newCallFrame->init(0, /*vPC=*/0, scopeChain, exec, dst, argc, JSC::asInternalFunction(callee));
+ newCallFrame->init(0, /*vPC=*/0, scopeChain, exec, dst, argc, JSC::asObject(callee));
result = constructData.native.function(newCallFrame, JSC::asObject(callee), applyArgs);
interp->registerFile().shrink(oldEnd);
}