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/qv4objectproto.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/qv4objectproto.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4objectproto.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp index b5446628bd..07573e61f3 100644 --- a/src/qml/jsruntime/qv4objectproto.cpp +++ b/src/qml/jsruntime/qv4objectproto.cpp @@ -61,11 +61,11 @@ void Heap::ObjectCtor::init(QV4::ExecutionContext *scope) Heap::FunctionObject::init(scope, QStringLiteral("Object")); } -ReturnedValue ObjectCtor::callAsConstructor(const Managed *m, CallData *callData) +ReturnedValue ObjectCtor::callAsConstructor(const FunctionObject *f, const Value *argv, int argc) { - ExecutionEngine *v4 = m->engine(); - const ObjectCtor *ctor = static_cast<const ObjectCtor *>(m); - if (!callData->argc() || callData->args[0].isUndefined() || callData->args[0].isNull()) { + ExecutionEngine *v4 = f->engine(); + const ObjectCtor *ctor = static_cast<const ObjectCtor *>(f); + if (!argc || argv[0].isUndefined() || argv[0].isNull()) { Scope scope(v4); ScopedObject obj(scope, scope.engine->newObject()); ScopedObject proto(scope, ctor->get(scope.engine->id_prototype())); @@ -73,17 +73,17 @@ ReturnedValue ObjectCtor::callAsConstructor(const Managed *m, CallData *callData obj->setPrototype(proto); return obj.asReturnedValue(); } else { - return callData->args[0].toObject(v4)->asReturnedValue(); + return argv[0].toObject(v4)->asReturnedValue(); } } -ReturnedValue ObjectCtor::call(const Managed *m, CallData *callData) +ReturnedValue ObjectCtor::call(const FunctionObject *m, const Value *, const Value *argv, int argc) { ExecutionEngine *v4 = m->engine(); - if (!callData->argc() || callData->args[0].isUndefined() || callData->args[0].isNull()) { + if (!argc || argv[0].isUndefined() || argv[0].isNull()) { return v4->newObject()->asReturnedValue(); } else { - return callData->args[0].toObject(v4)->asReturnedValue(); + return argv[0].toObject(v4)->asReturnedValue(); } } |