mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 990787, part 8 - Add an OOM check in WeakMap_set_impl. r=Waldo.
--HG-- extra : rebase_source : e97b20a18d5cc0b3f76f2bd2333a18cf5587fbaf
This commit is contained in:
parent
41dd38dcf1
commit
84614f9b19
@ -312,6 +312,8 @@ WeakMap_set_impl(JSContext *cx, CallArgs args)
|
||||
ObjectValueMap *map = thisObj->as<WeakMapObject>().getMap();
|
||||
if (!map) {
|
||||
map = cx->new_<ObjectValueMap>(cx, thisObj.get());
|
||||
if (!map)
|
||||
return false;
|
||||
if (!map->init()) {
|
||||
js_delete(map);
|
||||
JS_ReportOutOfMemory(cx);
|
||||
|
Loading…
Reference in New Issue
Block a user