aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativevmemetaobject.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-06-08 14:32:39 +1000
committerAaron Kennedy <aaron.kennedy@nokia.com>2011-06-08 14:32:39 +1000
commit8902609a7e6cc27fceff15aa80547f1137efd7c9 (patch)
tree5cceabf2176d66260a4e6a600fbdf7c8f4002c80 /src/declarative/qml/qdeclarativevmemetaobject.cpp
parent96cfe77fa311e60a2dfb7967d7ad6c06d40b99fb (diff)
Implement global handle tracking
This makes it easier to track down handles that have been double Dispose()'d. See qv8engine_p.h for details.
Diffstat (limited to 'src/declarative/qml/qdeclarativevmemetaobject.cpp')
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/declarative/qml/qdeclarativevmemetaobject.cpp
index 97c7754c6f..218b1c1209 100644
--- a/src/declarative/qml/qdeclarativevmemetaobject.cpp
+++ b/src/declarative/qml/qdeclarativevmemetaobject.cpp
@@ -419,8 +419,9 @@ QDeclarativeVMEMetaObject::~QDeclarativeVMEMetaObject()
delete parent;
delete [] data;
- for (int ii = 0; v8methods && ii < metaData->methodCount; ++ii)
- v8methods[ii].Dispose();
+ for (int ii = 0; v8methods && ii < metaData->methodCount; ++ii) {
+ qPersistentDispose(v8methods[ii]);
+ }
}
int QDeclarativeVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
@@ -845,7 +846,7 @@ void QDeclarativeVMEMetaObject::setVmeMethod(int index, v8::Persistent<v8::Funct
int methodIndex = index - methodOffset - plainSignals;
if (!v8methods[methodIndex].IsEmpty())
- v8methods[methodIndex].Dispose();
+ qPersistentDispose(v8methods[methodIndex]);
v8methods[methodIndex] = value;
}