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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user