diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-13 21:54:21 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-18 13:14:10 +0200 |
commit | e4e90923c93adfafb23c81be7359e8df2a500b4f (patch) | |
tree | 36be927b72606c4f37326089ff3c6261f484c92b /src/qml/jsruntime/qv4string.cpp | |
parent | 9dcc12d52343960400192c817f54a16f7e1f8247 (diff) |
Convert some methods to use Returned<>
Change-Id: I631606cb5ab3b35b72104e70092a5200dd235fbc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4string.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4string.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp index 2b2eda7c8c..d0f3a196b7 100644 --- a/src/qml/jsruntime/qv4string.cpp +++ b/src/qml/jsruntime/qv4string.cpp @@ -173,15 +173,17 @@ ReturnedValue String::getIndexed(Managed *m, uint index, bool *hasProperty) void String::put(Managed *m, String *name, const Value &value) { + Scope scope(m->engine()); String *that = static_cast<String *>(m); - Object *o = that->engine()->newStringObject(Value::fromString(that)); + Scoped<Object> o(scope, that->engine()->newStringObject(Value::fromString(that))); o->put(name, value); } void String::putIndexed(Managed *m, uint index, const Value &value) { + Scope scope(m->engine()); String *that = static_cast<String *>(m); - Object *o = m->engine()->newStringObject(Value::fromString(that)); + Scoped<Object> o(scope, that->engine()->newStringObject(Value::fromString(that))); o->putIndexed(index, value); } |