aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-06-04 16:00:13 +0200
committerLars Knoll <lars.knoll@digia.com>2013-06-05 10:53:39 +0200
commitc0a79111f7c08b482338df05e047da1ddbf95c9b (patch)
tree752756f0e091ce00a83379ebf0113236219e37ea /src/imports
parentba29371b9415e5a3d970edfbf6b3696b6a7f7b89 (diff)
Fix crashes in workerscript tests (qqmlecmascript and qquickworkerscript)
We need access to the QNam for a worker and other bits from the v8Engine, so for that it's easiest right now to store the v8engine pointer directly. There aren't many occurrences of v8engine left and we're gradually getting rid of them, but this let's the tests not crash at least :). Once the transition is complete, QV8Engine should collapse and v4->v8Engine->jsengine should become v4->publicEngine again. Change-Id: I98558dd687875f20f1dbe25381ee7efe502c7f24 Reviewed-by: Lars Knoll <lars.knoll@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 323b89b3e5..1c57b03b54 100644
--- a/src/imports/localstorage/plugin.cpp
+++ b/src/imports/localstorage/plugin.cpp
@@ -192,7 +192,7 @@ static QString qmlsqldatabase_databaseFile(const QString& connectionName, QV8Eng
static Value qmlsqldatabase_rows_index(QQmlSqlDatabaseWrapper *r, ExecutionEngine *v4, uint32_t index, bool *hasProperty = 0)
{
- QV8Engine *v8 = v4->publicEngine->handle();
+ QV8Engine *v8 = v4->v8Engine;
if (r->sqlQuery.at() == (int)index || r->sqlQuery.seek(index)) {
QSqlRecord record = r->sqlQuery.record();
@@ -240,7 +240,7 @@ static Value qmlsqldatabase_executeSql(SimpleCallContext *ctx)
if (!r || r->type != QQmlSqlDatabaseWrapper::Query)
V4THROW_REFERENCE("Not a SQLDatabase::Query object");
- QV8Engine *engine = ctx->engine->publicEngine->handle();
+ QV8Engine *engine = ctx->engine->v8Engine;
if (!r->inTransaction)
V4THROW_SQL(SQLEXCEPTION_DATABASE_ERR,QQmlEngine::tr("executeSql called outside transaction()"));
@@ -318,7 +318,7 @@ static Value qmlsqldatabase_changeVersion(SimpleCallContext *ctx)
if (!r || r->type != QQmlSqlDatabaseWrapper::Database)
V4THROW_REFERENCE("Not a SQLDatabase object");
- QV8Engine *engine = ctx->engine->publicEngine->handle();
+ QV8Engine *engine = ctx->engine->v8Engine;
QSqlDatabase db = r->database;
QString from_version = ctx->arguments[0].toQString();
@@ -374,7 +374,7 @@ static Value qmlsqldatabase_transaction_shared(SimpleCallContext *ctx, bool read
if (!r || r->type != QQmlSqlDatabaseWrapper::Database)
V4THROW_REFERENCE("Not a SQLDatabase object");
- QV8Engine *engine = ctx->engine->publicEngine->handle();
+ QV8Engine *engine = ctx->engine->v8Engine;
FunctionObject *callback = ctx->argumentCount ? ctx->arguments[0].asFunctionObject() : 0;
if (!callback)