aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4jsonobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-12 11:13:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:13:47 +0200
commit16f92ad85cf665d863ded5eeaaa7fc3f90820b3f (patch)
tree74b3477b9d6c023730835f1c478ceb6eaec68a2b /src/qml/jsruntime/qv4jsonobject.cpp
parent7d4e61dd824706984030c58684fa844ff9cde251 (diff)
Convert builtin methods to return a ReturnedValue
Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4jsonobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index c1cc5391b2..f63d67ef0e 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -874,7 +874,7 @@ JsonObject::JsonObject(ExecutionContext *context)
}
-Value JsonObject::method_parse(SimpleCallContext *ctx)
+ReturnedValue JsonObject::method_parse(SimpleCallContext *ctx)
{
QString jtext = ctx->argument(0).toString(ctx)->toQString();
@@ -887,10 +887,10 @@ Value JsonObject::method_parse(SimpleCallContext *ctx)
ctx->throwSyntaxError("JSON.parse: Parse error");
}
- return result;
+ return result.asReturnedValue();
}
-Value JsonObject::method_stringify(SimpleCallContext *ctx)
+ReturnedValue JsonObject::method_stringify(SimpleCallContext *ctx)
{
Scope scope(ctx);
@@ -930,8 +930,8 @@ Value JsonObject::method_stringify(SimpleCallContext *ctx)
QString result = stringify.Str(QString(), ctx->argument(0));
if (result.isEmpty())
- return Value::undefinedValue();
- return Value::fromString(ctx, result);
+ return Encode::undefined();
+ return Value::fromString(ctx, result).asReturnedValue();
}