aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4numberobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-25 22:42:58 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-28 13:33:43 +0200
commit18d4794e3f614eec8594f6636d569af8bc112618 (patch)
treec4f552dab56fea3f76b0b9542585a775c41db108 /src/qml/jsruntime/qv4numberobject.cpp
parent150731fc68bcf823bec40729285813d902990cb7 (diff)
Fix Value usage in ErrorObjects
Change-Id: Iaa14ad5a8d3f085843e49195f8f4bb7bb020b9b6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4numberobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index 396dc33fd5..9bf0d506f4 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -212,7 +212,7 @@ ReturnedValue NumberPrototype::method_toExponential(SimpleCallContext *ctx)
int fdigits = ctx->callData->args[0].toInt32();
if (fdigits < 0 || fdigits > 20) {
ScopedString error(scope, ctx->engine->newString(QStringLiteral("Number.prototype.toExponential: fractionDigits out of range")));
- ctx->throwRangeError(error.asValue());
+ ctx->throwRangeError(error);
}
}
@@ -236,7 +236,7 @@ ReturnedValue NumberPrototype::method_toPrecision(SimpleCallContext *ctx)
double precision = ctx->callData->args[0].toInt32();
if (precision < 1 || precision > 21) {
ScopedString error(scope, ctx->engine->newString(QStringLiteral("Number.prototype.toPrecision: precision out of range")));
- ctx->throwRangeError(error.asValue());
+ ctx->throwRangeError(error);
}
char str[100];