aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectiterator_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-01-24 22:13:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-31 11:13:48 +0100
commitd96478044ae0dfbcc35113e3941aa79604ba83a0 (patch)
treebe3950a5ae4e5b241c33c74e3b1bc88ccc683213 /src/qml/jsruntime/qv4objectiterator_p.h
parent28f422ebf516aefb34f1602aeef8f87432cc4fb9 (diff)
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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectiterator_p.h')
-rw-r--r--src/qml/jsruntime/qv4objectiterator_p.h7
1 files changed, 4 insertions, 3 deletions
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];
};