diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-05 13:22:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-11 13:01:50 +0200 |
commit | 6e8e5d16e16d6ee683a5c06a24f8f202ed5239ff (patch) | |
tree | fa8e710ad0ee4ff6cc9738fa717883c74d452b95 /src/qml/jsruntime/qv4globalobject.cpp | |
parent | 736afb8e9b3694efb8ca1fa8f3a8eeeaef530da2 (diff) | |
download | qtdeclarative-6e8e5d16e16d6ee683a5c06a24f8f202ed5239ff.tar.gz |
Move CallData onto the JS stack
Change-Id: I22e853acfd2da337344b581bb0412c5f9930c510
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4globalobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4globalobject.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp index 3b06a6d884..d71643b3dc 100644 --- a/src/qml/jsruntime/qv4globalobject.cpp +++ b/src/qml/jsruntime/qv4globalobject.cpp @@ -47,6 +47,7 @@ #include "qv4debugging_p.h" #include "qv4script_p.h" #include "qv4exception_p.h" +#include "qv4scopedvalue_p.h" #include <private/qqmljsengine_p.h> #include <private/qqmljslexer_p.h> @@ -390,9 +391,9 @@ Value EvalFunction::evalCall(Value /*thisObject*/, Value *args, int argc, bool d if (strictMode) { FunctionObject *e = FunctionObject::creatScriptFunction(ctx, function); - CALLDATA(0); - d.thisObject = ctx->thisObject; - return e->call(d); + ScopedCallData callData(ctx->engine, 0); + callData->thisObject = ctx->thisObject; + return e->call(callData); } ExecutionContext::EvalCode evalCode; @@ -441,7 +442,8 @@ Value EvalFunction::evalCall(Value /*thisObject*/, Value *args, int argc, bool d Value EvalFunction::call(Managed *that, const CallData &d) { // indirect call - return static_cast<EvalFunction *>(that)->evalCall(d.thisObject, d.args, d.argc, false); + // ### const_cast + return static_cast<EvalFunction *>(that)->evalCall(d.thisObject, const_cast<Value *>(d.args), d.argc, false); } |