SpiderMonkey 38 removes JS_AllocateArrayBufferContents.
Users required the returned buffer to be passable to free(), so replace it by malloc(). https://bugzilla.mozilla.org/show_bug.cgi?id=1037358 This was SVN commit r17511.
This commit is contained in:
parent
190f9176df
commit
332096e4ed
@ -396,8 +396,8 @@ jsval CStdDeserializer::ReadScriptVal(const char* UNUSED(name), JS::HandleObject
|
||||
#if BYTE_ORDER != LITTLE_ENDIAN
|
||||
#error TODO: need to convert JS ArrayBuffer data from little-endian
|
||||
#endif
|
||||
void* contents = NULL;
|
||||
contents = JS_AllocateArrayBufferContents(cx, length);
|
||||
void* contents = malloc(length);
|
||||
ENSURE(contents);
|
||||
RawBytes("buffer data", (u8*)contents, length);
|
||||
JS::RootedObject bufferObj(cx, JS_NewArrayBufferWithContents(cx, length, contents));
|
||||
AddScriptBackref(bufferObj);
|
||||
|
Loading…
Reference in New Issue
Block a user