From 16f92ad85cf665d863ded5eeaaa7fc3f90820b3f Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 12 Sep 2013 11:13:03 +0200 Subject: Convert builtin methods to return a ReturnedValue Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4jsonobject.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/qml/jsruntime/qv4jsonobject.cpp') 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(); } -- cgit v1.2.3