Bug 1082145 - |js::WatchGuts| can leak |wpmap|. r=erahm

This commit is contained in:
Jinank Jain 2015-05-21 11:52:16 +02:00
parent 58a227ed02
commit e0664236e3

View File

@ -3240,6 +3240,7 @@ js::WatchGuts(JSContext* cx, JS::HandleObject origObj, JS::HandleId id, JS::Hand
wpmap = cx->runtime()->new_<WatchpointMap>();
if (!wpmap || !wpmap->init()) {
ReportOutOfMemory(cx);
js_delete(wpmap);
return false;
}
cx->compartment()->watchpointMap = wpmap;