summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4globalobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4globalobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp10
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);
}