diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-11 15:09:25 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-18 13:13:30 +0200 |
commit | 8d26084ae56ba5aedd73ab733553dbf9cb3eb672 (patch) | |
tree | c0c14b3fdb87bdb23d5612de77605b98aa03dd52 /src/qml/jsruntime/qv4functionobject_p.h | |
parent | 4691396f96cf8468a9ee4fbb339cc94e339928a7 (diff) |
Use ReturnedValue for Managed::construct()
Change-Id: I9e702d60c4e1b7ba19a699ff7a8d53876d6cd5f7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject_p.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index bad62af6f3..bc5bc5c8df 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -115,11 +115,11 @@ struct Q_QML_EXPORT FunctionObject: Object { FunctionObject(ExecutionContext *scope, String *name = 0, bool createProto = false); ~FunctionObject(); - Value newInstance(); + ReturnedValue newInstance(); - static Value construct(Managed *that, CallData *); + static ReturnedValue construct(Managed *that, CallData *); static ReturnedValue call(Managed *that, CallData *d); - inline Value construct(CallData *callData) { + inline ReturnedValue construct(CallData *callData) { return vtbl->construct(this, callData); } inline ReturnedValue call(CallData *callData) { @@ -142,7 +142,7 @@ struct FunctionCtor: FunctionObject { FunctionCtor(ExecutionContext *scope); - static Value construct(Managed *that, CallData *callData); + static ReturnedValue construct(Managed *that, CallData *callData); static ReturnedValue call(Managed *that, CallData *callData); protected: @@ -165,7 +165,7 @@ struct BuiltinFunctionOld: FunctionObject { BuiltinFunctionOld(ExecutionContext *scope, String *name, Value (*code)(SimpleCallContext *)); - static Value construct(Managed *, CallData *); + static ReturnedValue construct(Managed *, CallData *); static ReturnedValue call(Managed *that, CallData *callData); protected: @@ -188,10 +188,10 @@ struct IndexedBuiltinFunction: FunctionObject isBuiltinFunction = true; } - static Value construct(Managed *m, CallData *) + static ReturnedValue construct(Managed *m, CallData *) { m->engine()->current->throwTypeError(); - return Value::undefinedValue(); + return Value::undefinedValue().asReturnedValue(); } static ReturnedValue call(Managed *that, CallData *callData); @@ -201,7 +201,7 @@ struct IndexedBuiltinFunction: FunctionObject struct ScriptFunction: FunctionObject { ScriptFunction(ExecutionContext *scope, Function *function); - static Value construct(Managed *, CallData *callData); + static ReturnedValue construct(Managed *, CallData *callData); static ReturnedValue call(Managed *that, CallData *callData); protected: @@ -211,7 +211,7 @@ protected: struct SimpleScriptFunction: FunctionObject { SimpleScriptFunction(ExecutionContext *scope, Function *function); - static Value construct(Managed *, CallData *callData); + static ReturnedValue construct(Managed *, CallData *callData); static ReturnedValue call(Managed *that, CallData *callData); protected: @@ -227,7 +227,7 @@ struct BoundFunction: FunctionObject { ~BoundFunction() {} - static Value construct(Managed *, CallData *d); + static ReturnedValue construct(Managed *, CallData *d); static ReturnedValue call(Managed *that, CallData *dd); static const ManagedVTable static_vtbl; |