Add support for structured cloning of String/Boolean/Number objects. Bug 602804, r=gal.

This commit is contained in:
Jason Orendorff
2010-12-03 10:07:08 -06:00
parent 99cde3459f
commit d91f9b75ee
5 changed files with 106 additions and 11 deletions

View File

@@ -118,6 +118,7 @@ struct JSStructuredCloneReader {
private:
JSContext *context() { return in.context(); }
bool checkDouble(jsdouble d);
JSString *readString(uint32_t nchars);
bool readTypedArray(uint32_t tag, uint32_t nelems, js::Value *vp);
bool readArrayBuffer(uint32_t nbytes, js::Value *vp);
@@ -145,7 +146,7 @@ struct JSStructuredCloneWriter {
private:
JSContext *context() { return out.context(); }
bool writeString(JSString *str);
bool writeString(uint32_t tag, JSString *str);
bool writeId(jsid id);
bool writeArrayBuffer(JSObject *obj);
bool writeTypedArray(JSObject *obj);