mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
In case of OOM in DEBUG build, don't crash. No bug, rs=jwalden via IRC.
--HG-- extra : rebase_source : c08508a93d1c1a98606dc1c7c8d9c08c57e17cad
This commit is contained in:
parent
71634c4850
commit
bfaa2dc218
@ -2902,8 +2902,10 @@ js_NewObjectWithGivenProto(JSContext *cx, JSClass *clasp, JSObject *proto,
|
||||
if (clasp == &js_FunctionClass && !objectSize) {
|
||||
obj = (JSObject*) js_NewGCFunction(cx);
|
||||
#ifdef DEBUG
|
||||
if (obj) {
|
||||
memset((uint8 *) obj + sizeof(JSObject), JS_FREE_PATTERN,
|
||||
sizeof(JSFunction) - sizeof(JSObject));
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
JS_ASSERT(!objectSize || objectSize == sizeof(JSObject));
|
||||
|
Loading…
Reference in New Issue
Block a user