diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-07-01 05:49:26 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-01 10:59:39 +0200 |
commit | 35deea613e96f9fced4fc48b1c5e59a4f7ee8e38 (patch) | |
tree | c36f4bab7f441d0409da422450d8382430d2cf8f /src/qml/qml/qqmllocale.cpp | |
parent | da3acc34ab9c1ab4ef8dc1277fba9b783adfe025 (diff) |
Fix qqmlecmascript::sequenceConversionThreads with aggressive GC
During the deserialization of a sequence, make sure that when the collector
runs during the filling of the array, that partially filled array is marked
properly.
Fixed setting of arrayDataLen in other similar places as well.
Change-Id: I19926f733c7c7d1398b11b48c1c37f43e7099ead
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmllocale.cpp')
-rw-r--r-- | src/qml/qml/qqmllocale.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp index 58ef5d0930..c07144a66c 100644 --- a/src/qml/qml/qqmllocale.cpp +++ b/src/qml/qml/qqmllocale.cpp @@ -524,13 +524,13 @@ QV4::Value QQmlLocaleData::method_get_weekDays(QV4::SimpleCallContext *ctx) QV4::ArrayObject *result = ctx->engine->newArrayObject(); result->arrayReserve(days.size()); + result->arrayDataLen = days.size(); for (int i = 0; i < days.size(); ++i) { int day = days.at(i); if (day == 7) // JS Date days in range 0(Sunday) to 6(Saturday) day = 0; result->arrayData[i].value = QV4::Value::fromInt32(day); } - result->arrayDataLen = days.size(); result->setArrayLengthUnchecked(days.size()); return QV4::Value::fromObject(result); @@ -542,9 +542,9 @@ QV4::Value QQmlLocaleData::method_get_uiLanguages(QV4::SimpleCallContext *ctx) QStringList langs = locale.uiLanguages(); QV4::ArrayObject *result = ctx->engine->newArrayObject(); result->arrayReserve(langs.size()); + result->arrayDataLen = langs.size(); for (int i = 0; i < langs.size(); ++i) result->arrayData[i].value = QV4::Value::fromString(ctx, langs.at(i)); - result->arrayDataLen = langs.size(); result->setArrayLengthUnchecked(langs.size()); return QV4::Value::fromObject(result); |