diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-10-21 15:55:45 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-07 21:07:41 +0000 |
commit | 6e3317bb171c718250bbb736567fc0e4812a6241 (patch) | |
tree | f4bbea80d807093ee077cb30a516517f2b47aacf /src/qml/jsruntime/qv4runtime.cpp | |
parent | 7f4a2f38b0440cc296949069822ae14d0b392da8 (diff) |
Change signature for call/callAsConstructor
Change-Id: I159b57acc7a2133ef1ad545aa84e792c63449a57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 42981949c9..7a5d114271 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -977,25 +977,25 @@ ReturnedValue Runtime::method_callGlobalLookup(ExecutionEngine *engine, uint ind ReturnedValue Runtime::method_callPossiblyDirectEval(ExecutionEngine *engine, Value *argv, int argc) { Scope scope(engine); - JSCallData callData(scope, argc, argv); + ScopedValue thisObject(scope); ExecutionContext &ctx = static_cast<ExecutionContext &>(engine->currentStackFrame->jsFrame->context); - ScopedFunctionObject function(scope, ctx.getPropertyAndBase(engine->id_eval(), callData->thisObject)); + ScopedFunctionObject function(scope, ctx.getPropertyAndBase(engine->id_eval(), thisObject)); if (engine->hasException) return Encode::undefined(); if (!function) { QString objectAsString = QStringLiteral("[null]"); - if (!callData->thisObject->isUndefined()) - objectAsString = callData->thisObject->toQStringNoThrow(); + if (!thisObject->isUndefined()) + objectAsString = thisObject->toQStringNoThrow(); QString msg = QStringLiteral("Property 'eval' of object %2 is not a function").arg(objectAsString); return engine->throwTypeError(msg); } if (function->d() == engine->evalFunction()->d()) - return static_cast<EvalFunction *>(function.getPointer())->evalCall(callData.callData(function), true); + return static_cast<EvalFunction *>(function.getPointer())->evalCall(thisObject, argv, argc, true); - return function->call(callData); + return function->call(thisObject, argv, argc); } ReturnedValue Runtime::method_callName(ExecutionEngine *engine, int nameIndex, Value *argv, int argc) |