diff options
Diffstat (limited to 'WebCore/bindings/js/ScriptState.h')
-rw-r--r-- | WebCore/bindings/js/ScriptState.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/WebCore/bindings/js/ScriptState.h b/WebCore/bindings/js/ScriptState.h index 6bef4f7..0c08611 100644 --- a/WebCore/bindings/js/ScriptState.h +++ b/WebCore/bindings/js/ScriptState.h @@ -32,10 +32,14 @@ #ifndef ScriptState_h #define ScriptState_h -#include "JSDOMBinding.h" #include <runtime/Protect.h> #include <wtf/Noncopyable.h> +namespace JSC { +class ExecState; +class JSGlobalObject; +} + namespace WebCore { class DOMWrapperWorld; class Frame; @@ -50,14 +54,9 @@ typedef JSC::ExecState ScriptState; class ScriptStateProtectedPtr : public Noncopyable { public: - ScriptStateProtectedPtr() { } - ScriptStateProtectedPtr(ScriptState* scriptState) : m_globalObject(scriptState->lexicalGlobalObject()) { } - ScriptState* get() - { - if (m_globalObject) - return m_globalObject->globalExec(); - return 0; - } + explicit ScriptStateProtectedPtr(ScriptState*); + ~ScriptStateProtectedPtr(); + ScriptState* get() const; private: JSC::ProtectedPtr<JSC::JSGlobalObject> m_globalObject; }; |