mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 929786 - Don't forget that JS_ValueToObject can return null (r=bustage)
--HG-- extra : rebase_source : 6bad633d1ad32c73ec749275a61d9ab37a367089
This commit is contained in:
parent
0d5ad78783
commit
7e5f227f3b
@ -1327,6 +1327,11 @@ Neuter(JSContext *cx, unsigned argc, jsval *vp)
|
||||
if (!JS_ValueToObject(cx, args.get(0), &obj))
|
||||
return false;
|
||||
|
||||
if (!obj) {
|
||||
JS_ReportError(cx, "neuter must be passed an object");
|
||||
return false;
|
||||
}
|
||||
|
||||
void *contents;
|
||||
uint8_t *data;
|
||||
if (!JS_StealArrayBufferContents(cx, obj, &contents, &data))
|
||||
|
Loading…
Reference in New Issue
Block a user