Bug 667652: Add a JS_FRIEND_API to get at the current offset in a structured clone buffer. r=jorendorff.

This commit is contained in:
Kyle Huey
2011-06-29 12:09:15 -07:00
parent 32a87759c1
commit 039da344dd
2 changed files with 12 additions and 0 deletions

View File

@@ -46,6 +46,9 @@
#include "jsvector.h"
#include "jsvalue.h"
JS_FRIEND_API(uint64_t)
js_GetSCOffset(JSStructuredCloneWriter* writer);
namespace js {
bool
@@ -73,6 +76,8 @@ struct SCOutput {
bool extractBuffer(uint64_t **datap, size_t *sizep);
uint64_t count() { return buf.length(); }
private:
JSContext *cx;
js::Vector<uint64_t> buf;