mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07: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
0e4d219bf3
commit
d99a65f479
@ -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