aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectiterator.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-14 14:04:48 +0200
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-14 18:11:09 +0200
commitd67c04502f41a69bfee4ca3762643d2dc31e9a28 (patch)
tree00bab498ec51a1bd7dd0fda309309d95415dc747 /src/qml/jsruntime/qv4objectiterator.cpp
parentf97c03441b8c46ada314f47295ebff4e98bb646e (diff)
parent5a9f0131f8c0b7424a4d323b0f65237206be45ea (diff)
Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts: src/qml/jsruntime/qv4objectiterator.cpp src/qml/jsruntime/qv4objectiterator_p.h src/quick/scenegraph/qsgthreadedrenderloop.cpp Change-Id: Ia54a9acd96530aa6683c228597af0ca25eadec4f
Diffstat (limited to 'src/qml/jsruntime/qv4objectiterator.cpp')
-rw-r--r--src/qml/jsruntime/qv4objectiterator.cpp31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/qml/jsruntime/qv4objectiterator.cpp b/src/qml/jsruntime/qv4objectiterator.cpp
index daee44cfb6..f9038472df 100644
--- a/src/qml/jsruntime/qv4objectiterator.cpp
+++ b/src/qml/jsruntime/qv4objectiterator.cpp
@@ -46,17 +46,7 @@ ObjectIterator::ObjectIterator(Value *scratch1, Value *scratch2, Object *o, uint
, memberIndex(0)
, flags(flags)
{
- object->o = o;
- current->o = o;
-#if QT_POINTER_SIZE == 4
- object->tag = QV4::Value::Managed_Type;
- current->tag = QV4::Value::Managed_Type;
-#endif
-
- if (object->as<ArgumentsObject>()) {
- Scope scope(object->engine());
- Scoped<ArgumentsObject> (scope, object->asReturnedValue())->fullyCreate();
- }
+ init(o);
}
ObjectIterator::ObjectIterator(Scope &scope, Object *o, uint flags)
@@ -67,8 +57,27 @@ ObjectIterator::ObjectIterator(Scope &scope, Object *o, uint flags)
, memberIndex(0)
, flags(flags)
{
+ init(o);
+}
+
+ObjectIterator::ObjectIterator(Value *scratch1, Value *scratch2, uint flags)
+ : object(scratch1)
+ , current(scratch2)
+ , arrayNode(0)
+ , arrayIndex(0)
+ , memberIndex(0)
+ , flags(flags)
+{
+ object->o = (Object*)0;
+ current->o = (Object*)0;
+ // Caller needs to call init!
+}
+
+void ObjectIterator::init(Object *o)
+{
object->o = o;
current->o = o;
+
#if QT_POINTER_SIZE == 4
object->tag = QV4::Value::Managed_Type;
current->tag = QV4::Value::Managed_Type;