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/qdeclarativetypeloader.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/qdeclarativetypeloader.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativetypeloader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp index 68fea5bcd5..b4e6ef4bf1 100644 --- a/src/declarative/qml/qdeclarativetypeloader.cpp +++ b/src/declarative/qml/qdeclarativetypeloader.cpp @@ -1101,8 +1101,8 @@ void QDeclarativeScriptData::clear() scripts.at(ii)->release(); scripts.clear(); - m_program.Dispose(); - m_value.Dispose(); + qPersistentDispose(m_program); + qPersistentDispose(m_value); } QDeclarativeScriptBlob::QDeclarativeScriptBlob(const QUrl &url, QDeclarativeTypeLoader *loader) @@ -1237,7 +1237,7 @@ void QDeclarativeScriptBlob::done() v8::HandleScope handle_scope; v8::Context::Scope scope(v8engine->context()); v8::Local<v8::Script> program = v8engine->qmlModeCompile(m_source, finalUrl().toString(), 1); - m_scriptData->m_program = v8::Persistent<v8::Script>::New(program); + m_scriptData->m_program = qPersistentNew<v8::Script>(program); } QDeclarativeQmldirData::QDeclarativeQmldirData(const QUrl &url) |