aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-05 13:22:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-11 13:01:50 +0200
commit6e8e5d16e16d6ee683a5c06a24f8f202ed5239ff (patch)
treefa8e710ad0ee4ff6cc9738fa717883c74d452b95 /src/imports
parent736afb8e9b3694efb8ca1fa8f3a8eeeaef530da2 (diff)
Move CallData onto the JS stack
Change-Id: I22e853acfd2da337344b581bb0412c5f9930c510 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/localstorage/plugin.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp
index 578c388b44..405acd0f7c 100644
--- a/src/imports/localstorage/plugin.cpp
+++ b/src/imports/localstorage/plugin.cpp
@@ -60,6 +60,7 @@
#include <private/qv4functionobject_p.h>
#include <private/qv4objectproto_p.h>
#include <private/qv4exception_p.h>
+#include <private/qv4scopedvalue_p.h>
using namespace QV4;
@@ -340,11 +341,11 @@ static Value qmlsqldatabase_changeVersion(SimpleCallContext *ctx)
ok = false;
db.transaction();
- CALLDATA(1);
- d.thisObject = engine->global();
- d.args[0] = Value::fromObject(w);
+ ScopedCallData callData(ctx->engine, 1);
+ callData->thisObject = engine->global();
+ callData->args[0] = Value::fromObject(w);
try {
- f->call(d);
+ f->call(callData);
} catch (Exception &) {
db.rollback();
throw;
@@ -394,11 +395,11 @@ static Value qmlsqldatabase_transaction_shared(SimpleCallContext *ctx, bool read
db.transaction();
if (callback) {
- CALLDATA(1);
- d.thisObject = engine->global();
- d.args[0] = Value::fromObject(w);
+ ScopedCallData callData(ctx->engine, 1);
+ callData->thisObject = engine->global();
+ callData->args[0] = Value::fromObject(w);
try {
- callback->call(d);
+ callback->call(callData);
} catch (Exception &) {
w->inTransaction = false;
db.rollback();
@@ -677,10 +678,10 @@ void QQuickLocalStorage::openDatabaseSync(QQmlV4Function *args)
db->version = version;
if (created && dbcreationCallback) {
- CALLDATA(1);
- d.thisObject = engine->global();
- d.args[0] = Value::fromObject(db);
- dbcreationCallback->call(d);
+ ScopedCallData callData(ctx->engine, 1);
+ callData->thisObject = engine->global();
+ callData->args[0] = Value::fromObject(db);
+ dbcreationCallback->call(callData);
}
args->setReturnValue(Value::fromObject(db));