diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.h')
-rw-r--r-- | src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.h b/src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.h index 19bb693..3d0d944 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.h +++ b/src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.h @@ -33,11 +33,14 @@ #include "PlatformString.h" #include "ScriptState.h" +#include <runtime/JSValue.h> #include <runtime/Protect.h> +#include <wtf/PassRefPtr.h> namespace WebCore { class String; +class SerializedScriptValue; class ScriptValue { public: @@ -45,7 +48,7 @@ public: virtual ~ScriptValue() {} JSC::JSValue jsValue() const { return m_value.get(); } - bool getString(String& result) const; + bool getString(ScriptState*, String& result) const; String toString(ScriptState* scriptState) const { return m_value.get().toString(scriptState); } bool isEqual(ScriptState*, const ScriptValue&) const; bool isNull() const; @@ -53,6 +56,11 @@ public: bool isObject() const; bool hasNoValue() const { return m_value == JSC::JSValue(); } + PassRefPtr<SerializedScriptValue> serialize(ScriptState*); + static ScriptValue deserialize(ScriptState*, SerializedScriptValue*); + + static ScriptValue undefined() { return ScriptValue(JSC::jsUndefined()); } + private: JSC::ProtectedJSValue m_value; }; |