diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-10 13:00:16 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-10 13:00:16 (GMT) |
commit | 400d4cf8aac6d22bf8992bea8e20db91a14469ae (patch) | |
tree | 77775143a1b75d87b2b3fda280b32a46b597d6f6 /src/script/api/qscriptengine_p.h | |
parent | 70f320f661a0241fcb5fc85f5b9df8e565f5f7e0 (diff) | |
download | Qt-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_p.h')
-rw-r--r-- | src/script/api/qscriptengine_p.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 20b2616..472b0da 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -143,7 +143,9 @@ public: JSC::JSValue defaultPrototype(int metaTypeId) const; void setDefaultPrototype(int metaTypeId, JSC::JSValue prototype); - QScriptContext *contextForFrame(JSC::ExecState *frame); + static QScriptContext *contextForFrame(JSC::ExecState *frame); + static JSC::ExecState *frameForContext(QScriptContext *context); + static const JSC::ExecState *frameForContext(const QScriptContext *context); JSC::JSGlobalObject *originalGlobalObject() const; JSC::JSObject *getOriginalGlobalObjectProxy(); @@ -207,7 +209,6 @@ public: JSC::JSGlobalData *globalData; JSC::JSObject *originalGlobalObjectProxy; JSC::ExecState *currentFrame; - QHash<JSC::ExecState*, QScriptContext*> contextForFrameHash; WTF::RefPtr<JSC::Structure> scriptObjectStructure; |