aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-07-28 10:07:57 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-04 20:17:54 +0100
commit486948817b26da2c62802bb93a0f671715c609d4 (patch)
tree45cd51615a6d187ac504c18c4dee4aa31cf9a771 /src/imports
parent6f6b350976ccfe959223b1fbe8c21fe71efc45bd (diff)
Move the throw methods from ExecutionContext to ExecutionEngine
The methods don't require a context, and thus shouldn't be implemented there. Change-Id: If058e0c5067093a4161f2275ac4288aa2bc500f3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/localstorage/plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp
index 02dc1a5078..8133202213 100644
--- a/src/imports/localstorage/plugin.cpp
+++ b/src/imports/localstorage/plugin.cpp
@@ -60,7 +60,7 @@ using namespace QV4;
QV4::Scoped<String> v(scope, scope.engine->newString(desc)); \
QV4::Scoped<Object> ex(scope, scope.engine->newErrorObject(v)); \
ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))).getPointer(), QV4::ScopedValue(scope, Primitive::fromInt32(error))); \
- ctx->throwError(ex); \
+ ctx->engine()->throwError(ex); \
return Encode::undefined(); \
}
@@ -68,13 +68,13 @@ using namespace QV4;
QV4::Scoped<String> v(scope, scope.engine->newString(desc)); \
QV4::Scoped<Object> ex(scope, scope.engine->newErrorObject(v)); \
ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))).getPointer(), QV4::ScopedValue(scope, Primitive::fromInt32(error))); \
- args->setReturnValue(ctx->throwError(ex)); \
+ args->setReturnValue(ctx->engine()->throwError(ex)); \
return; \
}
#define V4THROW_REFERENCE(string) { \
QV4::Scoped<String> v(scope, scope.engine->newString(string)); \
- ctx->throwReferenceError(v); \
+ ctx->engine()->throwReferenceError(v); \
return Encode::undefined(); \
}
@@ -179,7 +179,7 @@ static ReturnedValue qmlsqldatabase_rows_setForwardOnly(CallContext *ctx)
if (!r || r->d()->type != QQmlSqlDatabaseWrapper::Rows)
V4THROW_REFERENCE("Not a SQLDatabase::Rows object");
if (ctx->d()->callData->argc < 1)
- return ctx->throwTypeError();
+ return ctx->engine()->throwTypeError();
r->d()->sqlQuery.setForwardOnly(ctx->d()->callData->args[0].toBoolean());
return Encode::undefined();