Add default parameter value for ScopedCallData()
Change-Id: I16b6662a47c682e145d3e2201f9e90f58405a599 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This commit is contained in:
parent
87a055bc8e
commit
f43928f602
|
@ -1311,7 +1311,7 @@ ReturnedValue DatePrototype::method_toJSON(CallContext *ctx)
|
||||||
if (!toIso)
|
if (!toIso)
|
||||||
return ctx->engine()->throwTypeError();
|
return ctx->engine()->throwTypeError();
|
||||||
|
|
||||||
ScopedCallData callData(scope, 0);
|
ScopedCallData callData(scope);
|
||||||
callData->thisObject = ctx->d()->callData->thisObject;
|
callData->thisObject = ctx->d()->callData->thisObject;
|
||||||
return toIso->call(callData);
|
return toIso->call(callData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ ReturnedValue FunctionObject::name()
|
||||||
ReturnedValue FunctionObject::newInstance()
|
ReturnedValue FunctionObject::newInstance()
|
||||||
{
|
{
|
||||||
Scope scope(internalClass()->engine);
|
Scope scope(internalClass()->engine);
|
||||||
ScopedCallData callData(scope, 0);
|
ScopedCallData callData(scope);
|
||||||
return construct(callData);
|
return construct(callData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ ReturnedValue Object::getValue(const ValueRef thisObject, const Property *p, Pro
|
||||||
return Encode::undefined();
|
return Encode::undefined();
|
||||||
|
|
||||||
Scope scope(getter->engine());
|
Scope scope(getter->engine());
|
||||||
ScopedCallData callData(scope, 0);
|
ScopedCallData callData(scope);
|
||||||
callData->thisObject = *thisObject;
|
callData->thisObject = *thisObject;
|
||||||
return getter->call(callData);
|
return getter->call(callData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -408,7 +408,7 @@ ReturnedValue ObjectPrototype::method_toLocaleString(CallContext *ctx)
|
||||||
Scoped<FunctionObject> f(scope, o->get(ctx->d()->engine->id_toString));
|
Scoped<FunctionObject> f(scope, o->get(ctx->d()->engine->id_toString));
|
||||||
if (!f)
|
if (!f)
|
||||||
return ctx->engine()->throwTypeError();
|
return ctx->engine()->throwTypeError();
|
||||||
ScopedCallData callData(scope, 0);
|
ScopedCallData callData(scope);
|
||||||
callData->thisObject = o;
|
callData->thisObject = o;
|
||||||
return f->call(callData);
|
return f->call(callData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,7 +362,7 @@ struct Scoped
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ScopedCallData {
|
struct ScopedCallData {
|
||||||
ScopedCallData(Scope &scope, int argc)
|
ScopedCallData(Scope &scope, int argc = 0)
|
||||||
{
|
{
|
||||||
int size = qMax(argc, (int)QV4::Global::ReservedArgumentCount) + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value);
|
int size = qMax(argc, (int)QV4::Global::ReservedArgumentCount) + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value);
|
||||||
ptr = reinterpret_cast<CallData *>(scope.engine->stackPush(size));
|
ptr = reinterpret_cast<CallData *>(scope.engine->stackPush(size));
|
||||||
|
|
|
@ -306,7 +306,7 @@ ReturnedValue Script::run()
|
||||||
} else {
|
} else {
|
||||||
ScopedObject qmlObj(valueScope, qml.value());
|
ScopedObject qmlObj(valueScope, qml.value());
|
||||||
ScopedFunctionObject f(valueScope, engine->memoryManager->alloc<QmlBindingWrapper>(scope, vmFunction, qmlObj));
|
ScopedFunctionObject f(valueScope, engine->memoryManager->alloc<QmlBindingWrapper>(scope, vmFunction, qmlObj));
|
||||||
ScopedCallData callData(valueScope, 0);
|
ScopedCallData callData(valueScope);
|
||||||
callData->thisObject = Primitive::undefinedValue();
|
callData->thisObject = Primitive::undefinedValue();
|
||||||
return f->call(callData);
|
return f->call(callData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ QV4::ReturnedValue QQmlJavaScriptExpression::evaluate(QQmlContextData *context,
|
||||||
{
|
{
|
||||||
QV4::ExecutionEngine *v4 = QV8Engine::getV4(context->engine);
|
QV4::ExecutionEngine *v4 = QV8Engine::getV4(context->engine);
|
||||||
QV4::Scope scope(v4);
|
QV4::Scope scope(v4);
|
||||||
QV4::ScopedCallData callData(scope, 0);
|
QV4::ScopedCallData callData(scope);
|
||||||
|
|
||||||
return evaluate(context, function, callData, isUndefined);
|
return evaluate(context, function, callData, isUndefined);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1568,7 +1568,7 @@ void QQmlXMLHttpRequest::dispatchCallbackImpl(const ValueRef me)
|
||||||
|
|
||||||
QQmlContextData *callingContext = QmlContextWrapper::getContext(activationObject);
|
QQmlContextData *callingContext = QmlContextWrapper::getContext(activationObject);
|
||||||
if (callingContext) {
|
if (callingContext) {
|
||||||
QV4::ScopedCallData callData(scope, 0);
|
QV4::ScopedCallData callData(scope);
|
||||||
callData->thisObject = activationObject.asReturnedValue();
|
callData->thisObject = activationObject.asReturnedValue();
|
||||||
callback->call(callData);
|
callback->call(callData);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue