diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-19 12:55:36 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-22 01:06:20 +0200 |
commit | a9bdc91cefabb3729d0240fce4c01a669be09dbf (patch) | |
tree | 6f2a2639164ec1a530ccc33bc96bece299df0dbf /src/qml/jsruntime/qv4object.cpp | |
parent | 49369e62b50a4f903a5b2fcbfbfbc1f6f2838e8e (diff) |
Fix some more methods to take ValueRef's
Change-Id: Ia0e30ba98c16e51c9992027c7e5f78d4def8697a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 7b9074edd5..77c755e413 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -861,7 +861,7 @@ void Object::internalPutIndexed(uint index, const ValueRef value) return; } - arraySet(index, *value); + arraySet(index, value); return; reject: @@ -1110,13 +1110,15 @@ bool Object::__defineOwnProperty__(ExecutionContext *ctx, const QString &name, c void Object::copyArrayData(Object *other) { Q_ASSERT(isArrayObject()); + Scope scope(engine()); if (other->protoHasArray() || other->hasAccessorProperty) { uint len = other->arrayLength(); Q_ASSERT(len); + ScopedValue v(scope); for (uint i = 0; i < len; ++i) { - arraySet(i, Value::fromReturnedValue(other->getIndexed(i))); + arraySet(i, (v = other->getIndexed(i))); } } else { arrayReserve(other->arrayDataLen); |