aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4jsonobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4jsonobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index 721843afba..5a8acf803c 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -801,7 +801,7 @@ QString Stringify::JO(ObjectRef o)
name = it.nextPropertyNameAsString(val);
if (name->isNull())
break;
- QString key = name->toQStringNoThrow();
+ QString key = name->toQString();
QString member = makeMember(key, val);
if (!member.isEmpty())
partial += member;
@@ -951,7 +951,7 @@ ReturnedValue JsonObject::method_stringify(SimpleCallContext *ctx)
ScopedValue arg0(scope, ctx->argument(0));
QString result = stringify.Str(QString(), arg0);
- if (result.isEmpty())
+ if (result.isEmpty() || scope.engine->hasException)
return Encode::undefined();
return ctx->engine->newString(result)->asReturnedValue();
}