Bug 1124018 - Null the allocation site table if initialization fails. r=jonco

This commit is contained in:
Brian Hackett 2015-01-26 13:14:34 -05:00
Родитель 89ad6af62f
Коммит adfb811900
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -2285,6 +2285,7 @@ TypeCompartment::addAllocationSiteTypeObject(JSContext *cx, AllocationSiteKey ke
allocationSiteTable = cx->new_<AllocationSiteTable>();
if (!allocationSiteTable || !allocationSiteTable->init()) {
js_delete(allocationSiteTable);
allocationSiteTable = nullptr;
return nullptr;
}
}