summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4globalobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4globalobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp8
1 files changed, 5 insertions, 3 deletions
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)