From dba56a752c932670c0e9461f106d2bc084276b6f Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 9 May 2014 12:15:23 +0200 Subject: Convert remaining FunctionObject's to new constructor scheme Change-Id: I440d5b128d0ee28566ebfa82c2505a4bd97bba6b Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4globalobject.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4globalobject.cpp') diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp index 1be9561193..fc4a097915 100644 --- a/src/qml/jsruntime/qv4globalobject.cpp +++ b/src/qml/jsruntime/qv4globalobject.cpp @@ -346,11 +346,13 @@ static QString decode(const QString &input, DecodeMode decodeMode, bool *ok) DEFINE_OBJECT_VTABLE(EvalFunction); -EvalFunction::EvalFunction(ExecutionContext *scope) - : FunctionObject(scope, scope->d()->engine->id_eval) +EvalFunction::Data::Data(ExecutionContext *scope) + : FunctionObject::Data(scope, scope->d()->engine->id_eval) { setVTable(staticVTable()); - defineReadonlyProperty(scope->d()->engine->id_length, Primitive::fromInt32(1)); + Scope s(scope); + ScopedFunctionObject f(s, this); + f->defineReadonlyProperty(s.engine->id_length, Primitive::fromInt32(1)); } ReturnedValue EvalFunction::evalCall(CallData *callData, bool directCall) -- cgit v1.2.3