aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4regexpobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-14 11:25:02 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:14:13 +0200
commitf79df5da0769836bc866b470cdac43d6363dc7db (patch)
tree28deb1584b6c43dca92b39328bcf43099a92fcd6 /src/qml/jsruntime/qv4regexpobject.cpp
parente4e90923c93adfafb23c81be7359e8df2a500b4f (diff)
Convert more methods to return a Returned<>
Change-Id: If294c9c4f574824c308b63a11da1337226180105 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index 38ebf8d9e6..60a5026772 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -321,7 +321,7 @@ ReturnedValue RegExpPrototype::method_exec(SimpleCallContext *ctx)
}
// fill in result data
- ArrayObject *array = ctx->engine->newArrayObject(ctx->engine->regExpExecArrayClass);
+ Scoped<ArrayObject> array(scope, ctx->engine->newArrayObject(ctx->engine->regExpExecArrayClass));
int len = r->value->captureCount();
array->arrayReserve(len);
for (int i = 0; i < len; ++i) {
@@ -338,7 +338,7 @@ ReturnedValue RegExpPrototype::method_exec(SimpleCallContext *ctx)
if (r->global)
r->lastIndexProperty(ctx)->value = Value::fromInt32(matchOffsets[1]);
- return Value::fromObject(array).asReturnedValue();
+ return array.asReturnedValue();
}
ReturnedValue RegExpPrototype::method_test(SimpleCallContext *ctx)