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/qv8include.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/qv8include.cpp')
-rw-r--r-- | src/declarative/qml/v8/qv8include.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/qml/v8/qv8include.cpp b/src/declarative/qml/v8/qv8include.cpp index f2b25e0a92..3b8a081a3b 100644 --- a/src/declarative/qml/v8/qv8include.cpp +++ b/src/declarative/qml/v8/qv8include.cpp @@ -54,11 +54,11 @@ QV8Include::QV8Include(const QUrl &url, QV8Engine *engine, QDeclarativeContextDa v8::Handle<v8::Object> qmlglobal, v8::Handle<v8::Function> callback) : m_engine(engine), m_network(0), m_reply(0), m_url(url), m_redirectCount(0), m_context(context) { - m_qmlglobal = v8::Persistent<v8::Object>::New(qmlglobal); + m_qmlglobal = qPersistentNew<v8::Object>(qmlglobal); if (!callback.IsEmpty()) - m_callbackFunction = v8::Persistent<v8::Function>::New(callback); + m_callbackFunction = qPersistentNew<v8::Function>(callback); - m_resultObject = v8::Persistent<v8::Object>::New(resultValue()); + m_resultObject = qPersistentNew<v8::Object>(resultValue()); m_network = engine->networkAccessManager(); @@ -72,8 +72,8 @@ QV8Include::QV8Include(const QUrl &url, QV8Engine *engine, QDeclarativeContextDa QV8Include::~QV8Include() { delete m_reply; m_reply = 0; - m_callbackFunction.Dispose(); - m_resultObject.Dispose(); + qPersistentDispose(m_callbackFunction); + qPersistentDispose(m_resultObject); } v8::Local<v8::Object> QV8Include::resultValue(Status status) |