aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-10-11 12:26:27 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-11 16:01:24 +0200
commite964fc34269bc2087fb3246172a1890224a160bd (patch)
treeb66e36e3fa6280bc94ad00002c035280ff24deee /src/quick
parentf6de6160b915b5a35e75746a35c4ef94ceb9b2c2 (diff)
Fix the remaining objects against self destruction
This makes pretty much all test cases pass with exact garbage collection. Change-Id: Ia874e3c17c3984afb7cfe370f9bd3ad8fe46699a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 6f7cd77486..f7704306d3 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -545,6 +545,9 @@ public:
QQuickJSContext2DPrototype(QV4::ExecutionEngine *engine)
: QV4::Object(engine)
{
+ QV4::Scope scope(engine);
+ QV4::ScopedObject protectThis(scope, this);
+
defineDefaultProperty(QStringLiteral("quadraticCurveTo"), method_quadraticCurveTo, 0);
defineDefaultProperty(QStringLiteral("restore"), method_restore, 0);
defineDefaultProperty(QStringLiteral("moveTo"), method_moveTo, 0);
@@ -891,6 +894,9 @@ struct QQuickJSContext2DImageData : public QV4::Object
{
vtbl = &static_vtbl;
+ QV4::Scope scope(engine);
+ QV4::ScopedObject protectThis(scope, this);
+
defineAccessorProperty(QStringLiteral("width"), method_get_width, 0);
defineAccessorProperty(QStringLiteral("height"), method_get_height, 0);
defineAccessorProperty(QStringLiteral("data"), method_get_data, 0);