aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativelistmodel.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/util/qdeclarativelistmodel.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/util/qdeclarativelistmodel.cpp')
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 1f26140909..d4af0b17b2 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -102,12 +102,12 @@ QDeclarativeListModelV8Data::QDeclarativeListModelV8Data()
v8::Local<v8::FunctionTemplate> ft = v8::FunctionTemplate::New();
ft->InstanceTemplate()->SetNamedPropertyHandler(Getter, Setter);
ft->InstanceTemplate()->SetHasExternalResource(true);
- constructor = v8::Persistent<v8::Function>::New(ft->GetFunction());
+ constructor = qPersistentNew<v8::Function>(ft->GetFunction());
}
QDeclarativeListModelV8Data::~QDeclarativeListModelV8Data()
{
- constructor.Dispose(); constructor.Clear();
+ qPersistentDispose(constructor);
}
v8::Handle<v8::Value> QDeclarativeListModelV8Data::Getter(v8::Local<v8::String> property,