diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-08 14:32:39 +1000 |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-08 14:32:39 +1000 |
commit | 8902609a7e6cc27fceff15aa80547f1137efd7c9 (patch) | |
tree | 5cceabf2176d66260a4e6a600fbdf7c8f4002c80 /src/declarative/qml/v8/qv8contextwrapper.cpp | |
parent | 96cfe77fa311e60a2dfb7967d7ad6c06d40b99fb (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/v8/qv8contextwrapper.cpp')
-rw-r--r-- | src/declarative/qml/v8/qv8contextwrapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/qml/v8/qv8contextwrapper.cpp b/src/declarative/qml/v8/qv8contextwrapper.cpp index 1af4b4c883..27002c6dc0 100644 --- a/src/declarative/qml/v8/qv8contextwrapper.cpp +++ b/src/declarative/qml/v8/qv8contextwrapper.cpp @@ -123,8 +123,8 @@ QV8ContextWrapper::~QV8ContextWrapper() void QV8ContextWrapper::destroy() { - m_urlConstructor.Dispose(); m_urlConstructor.Clear(); - m_constructor.Dispose(); m_constructor.Clear(); + qPersistentDispose(m_urlConstructor); + qPersistentDispose(m_constructor); } void QV8ContextWrapper::init(QV8Engine *engine) @@ -134,13 +134,13 @@ void QV8ContextWrapper::init(QV8Engine *engine) v8::Local<v8::FunctionTemplate> ft = v8::FunctionTemplate::New(); ft->InstanceTemplate()->SetHasExternalResource(true); ft->InstanceTemplate()->SetFallbackPropertyHandler(Getter, Setter); - m_constructor = v8::Persistent<v8::Function>::New(ft->GetFunction()); + m_constructor = qPersistentNew<v8::Function>(ft->GetFunction()); } { v8::Local<v8::FunctionTemplate> ft = v8::FunctionTemplate::New(); ft->InstanceTemplate()->SetHasExternalResource(true); ft->InstanceTemplate()->SetFallbackPropertyHandler(NullGetter, NullSetter); - m_urlConstructor = v8::Persistent<v8::Function>::New(ft->GetFunction()); + m_urlConstructor = qPersistentNew<v8::Function>(ft->GetFunction()); } } |