summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r--src/qml/jsruntime/qv4context.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index d8990bf8be..aa0688ee9b 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -604,7 +604,7 @@ void ExecutionContext::throwError(const ValueRef value)
void ExecutionContext::throwError(const QString &message)
{
Scope scope(this);
- ScopedValue v(scope, Value::fromString(this, message));
+ ScopedValue v(scope, engine->newString(message));
v = engine->newErrorObject(v);
throwError(v);
}
@@ -640,7 +640,7 @@ void ExecutionContext::throwTypeError(const QString &message)
void ExecutionContext::throwUnimplemented(const QString &message)
{
Scope scope(this);
- ScopedValue v(scope, Value::fromString(this, QStringLiteral("Unimplemented ") + message));
+ ScopedValue v(scope, engine->newString(QStringLiteral("Unimplemented ") + message));
v = engine->newErrorObject(v);
throwError(v);
}