summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-10 13:00:16 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-10 13:00:16 (GMT)
commit400d4cf8aac6d22bf8992bea8e20db91a14469ae (patch)
tree77775143a1b75d87b2b3fda280b32a46b597d6f6 /src/script/api/qscriptengine.cpp
parent70f320f661a0241fcb5fc85f5b9df8e565f5f7e0 (diff)
downloadQt-400d4cf8aac6d22bf8992bea8e20db91a14469ae.zip
Qt-400d4cf8aac6d22bf8992bea8e20db91a14469ae.tar.gz
Qt-400d4cf8aac6d22bf8992bea8e20db91a14469ae.tar.bz2
cleanup (hide the use of reinterpret_cast)
Introduce a frameForContext() function so we don't have to cast all over the place.
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r--src/script/api/qscriptengine.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index f84e36e..3ae1502 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -863,7 +863,6 @@ QScriptEnginePrivate::~QScriptEnginePrivate()
detachAllRegisteredScriptValues();
qDeleteAll(m_qobjectData);
qDeleteAll(m_typeInfos);
- qDeleteAll(contextForFrameHash);
JSC::JSLock lock(false);
globalData->heap.destroy();
globalData->deref();
@@ -1043,6 +1042,16 @@ QScriptContext *QScriptEnginePrivate::contextForFrame(JSC::ExecState *frame)
return reinterpret_cast<QScriptContext *>(frame);
}
+JSC::ExecState *QScriptEnginePrivate::frameForContext(QScriptContext *context)
+{
+ return reinterpret_cast<JSC::ExecState*>(context);
+}
+
+const JSC::ExecState *QScriptEnginePrivate::frameForContext(const QScriptContext *context)
+{
+ return reinterpret_cast<const JSC::ExecState*>(context);
+}
+
JSC::JSGlobalObject *QScriptEnginePrivate::originalGlobalObject() const
{
return globalData->head;