diff options
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject_p.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index dfd160dbc0..d01a989ae1 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -106,16 +106,19 @@ struct Q_QML_EXPORT FunctionObject: Object { }; ExecutionContext *scope; - String *name; + SafeString name; String * const *formalParameterList; String * const *varList; unsigned int formalParameterCount; unsigned int varCount; Function *function; - FunctionObject(ExecutionContext *scope, String *name = 0, bool createProto = false); + FunctionObject(ExecutionContext *scope, const StringRef name, bool createProto = false); + FunctionObject(ExecutionContext *scope, const QString &name = QString(), bool createProto = false); ~FunctionObject(); + void init(const StringRef name, bool createProto); + ReturnedValue newInstance(); static ReturnedValue construct(Managed *that, CallData *); @@ -171,7 +174,7 @@ struct BuiltinFunction: FunctionObject { Q_MANAGED ReturnedValue (*code)(SimpleCallContext *); - BuiltinFunction(ExecutionContext *scope, String *name, ReturnedValue (*code)(SimpleCallContext *)); + BuiltinFunction(ExecutionContext *scope, const StringRef name, ReturnedValue (*code)(SimpleCallContext *)); static ReturnedValue construct(Managed *, CallData *); static ReturnedValue call(Managed *that, CallData *callData); @@ -185,7 +188,7 @@ struct IndexedBuiltinFunction: FunctionObject uint index; IndexedBuiltinFunction(ExecutionContext *scope, uint index, ReturnedValue (*code)(SimpleCallContext *ctx, uint index)) - : FunctionObject(scope, /*name*/0) + : FunctionObject(scope) , code(code) , index(index) { |