From d96478044ae0dfbcc35113e3941aa79604ba83a0 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 24 Jan 2014 22:13:06 +0100 Subject: Get rid of the SafeObject class Having SafeValue is enough, and we can pass an ObjectRef instead of a SafeObject * for function calls. Change-Id: I4e1435105403f8091b43eeda01303f9602c74235 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4objectiterator_p.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4objectiterator_p.h') diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h index 08a740fc37..6d0b5fcc80 100644 --- a/src/qml/jsruntime/qv4objectiterator_p.h +++ b/src/qml/jsruntime/qv4objectiterator_p.h @@ -74,7 +74,7 @@ struct Q_QML_EXPORT ObjectIterator uint memberIndex; uint flags; - ObjectIterator(SafeObject *scratch1, SafeObject *scratch2, const ObjectRef o, uint flags); + ObjectIterator(ObjectRef scratch1, ObjectRef scratch2, const ObjectRef o, uint flags); ObjectIterator(Scope &scope, const ObjectRef o, uint flags); void next(StringRef name, uint *index, Property *pd, PropertyAttributes *attributes = 0); ReturnedValue nextPropertyName(ValueRef value); @@ -87,7 +87,8 @@ struct ForEachIteratorObject: Object { Q_MANAGED_TYPE(ForeachIteratorObject) ObjectIterator it; ForEachIteratorObject(ExecutionContext *ctx, const ObjectRef o) - : Object(ctx->engine), it(workArea, workArea + 1, o, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain) { + : Object(ctx->engine), it(ObjectRef::fromValuePointer(workArea), ObjectRef::fromValuePointer(workArea + 1), + o, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain) { setVTable(staticVTable()); } @@ -96,7 +97,7 @@ struct ForEachIteratorObject: Object { protected: static void markObjects(Managed *that, ExecutionEngine *e); - SafeObject workArea[2]; + SafeValue workArea[2]; }; -- cgit v1.2.3