From f5b98f63862d4f36774d6baea5d3789350844e04 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 17 Oct 2012 09:05:56 +0200 Subject: Generate correct code when calling values __qmljs_call_value was still using a pointer to a Value. In addition, qcv4isel_masm.cpp was using a wrong order of the arguments. Change-Id: I0414aa732ae8074420e4f11525f5b04712cc1bab Reviewed-by: Simon Hausmann --- qmljs_runtime.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'qmljs_runtime.cpp') diff --git a/qmljs_runtime.cpp b/qmljs_runtime.cpp index 94c2bc299c..73391159f2 100644 --- a/qmljs_runtime.cpp +++ b/qmljs_runtime.cpp @@ -809,14 +809,14 @@ Value __qmljs_object_default_value(Context *ctx, const Value object, int typeHin Value conv = oo->getProperty(ctx, meth1); if (!conv.isUndefined() && conv.isFunctionObject()) { - Value r = __qmljs_call_value(ctx, object, &conv, 0, 0); + Value r = __qmljs_call_value(ctx, object, conv, 0, 0); if (r.isPrimitive()) return r; } conv = oo->getProperty(ctx, meth2); if (!conv.isUndefined() && conv.isFunctionObject()) { - Value r = __qmljs_call_value(ctx, object, &conv, 0, 0); + Value r = __qmljs_call_value(ctx, object, conv, 0, 0); if (r.isPrimitive()) return r; } @@ -1074,7 +1074,7 @@ Value __qmljs_call_activation_property(Context *context, String *name, Value *ar context->throwReferenceError(Value::fromString(name)); return Value::undefinedValue(); } - Value result = __qmljs_call_value(context, Value::undefinedValue(), func, args, argc); + Value result = __qmljs_call_value(context, Value::undefinedValue(), *func, args, argc); return result; } @@ -1111,10 +1111,10 @@ Value __qmljs_call_property(Context *context, const Value base, String *name, Va return result; } -Value __qmljs_call_value(Context *context, const Value thisObject, const Value *func, Value *args, int argc) +Value __qmljs_call_value(Context *context, const Value thisObject, const Value func, Value *args, int argc) { Value result; - if (FunctionObject *f = func->asFunctionObject()) { + if (FunctionObject *f = func.asFunctionObject()) { Context k; Context *ctx = f->needsActivation ? context->engine->newContext() : &k; const Value *that = thisObject.isUndefined() ? 0 : &thisObject; -- cgit v1.2.3