aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectiterator_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-27 08:56:03 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-17 11:01:10 +0100
commit9d2a5ea28adf8ab35212ca8a71b479bc50960e3d (patch)
treec59e0799ccf55f832f1e2bde02e256ef62ac2d19 /src/qml/jsruntime/qv4objectiterator_p.h
parenta58893eeda6bd48f41bdfa19eda147343be5f81e (diff)
Return a Heap::Object in Object::prototype()
Change-Id: Ice0265ae558ba14497421a5bbf25ee9db76adab5 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.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h
index 4398ea9b5a..7710543114 100644
--- a/src/qml/jsruntime/qv4objectiterator_p.h
+++ b/src/qml/jsruntime/qv4objectiterator_p.h
@@ -48,6 +48,7 @@ struct Q_QML_EXPORT ObjectIterator
WithProtoChain = 0x2,
};
+ ExecutionEngine *engine;
Value *object;
Value *current;
SparseArrayNode *arrayNode;
@@ -55,16 +56,13 @@ struct Q_QML_EXPORT ObjectIterator
uint memberIndex;
uint flags;
- ObjectIterator(Value *scratch1, Value *scratch2, Object *o, uint flags);
+ ObjectIterator(ExecutionEngine *e, Value *scratch1, Value *scratch2, Object *o, uint flags);
ObjectIterator(Scope &scope, Object *o, uint flags);
void init(Object *o);
void next(String *&name, uint *index, Property *pd, PropertyAttributes *attributes = 0);
ReturnedValue nextPropertyName(ValueRef value);
ReturnedValue nextPropertyNameAsString(ValueRef value);
ReturnedValue nextPropertyNameAsString();
-private:
- friend struct ForEachIteratorObject;
- ObjectIterator(Value *scratch1, Value *scratch2, uint flags); // Constructor that requires calling init()
};
namespace Heap {
@@ -89,7 +87,7 @@ protected:
inline
Heap::ForEachIteratorObject::ForEachIteratorObject(QV4::ExecutionEngine *engine, QV4::Object *o)
: Heap::Object(engine)
- , it(workArea, workArea + 1, o, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain)
+ , it(engine, workArea, workArea + 1, o, ObjectIterator::EnumerableOnly|ObjectIterator::WithProtoChain)
{
setVTable(QV4::ForEachIteratorObject::staticVTable());
}