18#ifndef INCLUDED_STDDESERIALIZER
19#define INCLUDED_STDDESERIALIZER
33 virtual void ScriptVal(
const char* name, JS::MutableHandleValue
out);
35 virtual void ScriptString(
const char* name, JS::MutableHandleString
out);
40 static void Trace(JSTracer *trc,
void *data);
45 virtual void Get(
const char* name,
u8* data,
size_t len);
48 JS::Value
ReadScriptVal(
const char* name, JS::HandleObject preexistingObject);
Definition: StdDeserializer.h:27
std::istream & m_Stream
Definition: StdDeserializer.h:58
virtual void GetScriptBackref(size_t tag, JS::MutableHandleObject ret)
Definition: StdDeserializer.cpp:112
virtual void Get(const char *name, u8 *data, size_t len)
Definition: StdDeserializer.cpp:59
virtual void RequireBytesInStream(size_t numBytes)
Throws an exception if the stream definitely cannot provide the required number of bytes.
Definition: StdDeserializer.cpp:93
JS::Value ReadScriptVal(const char *name, JS::HandleObject preexistingObject)
Definition: StdDeserializer.cpp:120
void TraceMember(JSTracer *trc)
Definition: StdDeserializer.cpp:53
virtual std::istream & GetStream()
Returns a stream which can be used to deserialize data directly.
Definition: StdDeserializer.cpp:88
void ReadStringUTF16(const char *name, std::u16string &str)
Definition: StdDeserializer.cpp:447
virtual ~CStdDeserializer()
Definition: StdDeserializer.cpp:43
virtual void AddScriptBackref(JS::HandleObject obj)
Definition: StdDeserializer.cpp:107
const ScriptInterface & m_ScriptInterface
Definition: StdDeserializer.h:56
void ReadStringLatin1(const char *name, std::vector< JS::Latin1Char > &str)
Definition: StdDeserializer.cpp:438
virtual void ScriptString(const char *name, JS::MutableHandleString out)
Deserialize a JSString.
Definition: StdDeserializer.cpp:456
CStdDeserializer(const ScriptInterface &scriptInterface, std::istream &stream)
Definition: StdDeserializer.cpp:35
virtual void ScriptObjectAssign(const char *name, JS::HandleValue objVal)
Deserialize an object and assign its properties to objVal (Essentially equivalent to Object....
Definition: StdDeserializer.cpp:491
static void Trace(JSTracer *trc, void *data)
Definition: StdDeserializer.cpp:48
NONCOPYABLE(CStdDeserializer)
std::vector< JS::Heap< JSObject * > > m_ScriptBackrefs
Definition: StdDeserializer.h:54
virtual void ScriptVal(const char *name, JS::MutableHandleValue out)
Deserialize a JS::Value, replacing 'out'.
Definition: StdDeserializer.cpp:486
Deserialization interface; see serialization overview.
Definition: IDeserializer.h:35
Abstraction around a SpiderMonkey JS::Realm.
Definition: ScriptInterface.h:72
uint8_t u8
Definition: types.h:37
static void out(const wchar_t *fmt,...)
Definition: wdbg_sym.cpp:407