Bug 1117240 - Check return value when creating type object in RegExpCompartment::createMatchResultTemp() r=bhackett

This commit is contained in:
Jon Coppeard 2015-01-06 11:28:16 +00:00
Родитель 65df79cbad
Коммит 499a2d8782
1 изменённых файлов: 2 добавлений и 0 удалений

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

@ -710,6 +710,8 @@ RegExpCompartment::createMatchResultTemplateObject(JSContext *cx)
Rooted<TaggedProto> proto(cx, templateObject->getTaggedProto());
types::TypeObject *type =
cx->compartment()->types.newTypeObject(cx, templateObject->getClass(), proto);
if (!type)
return matchResultTemplateObject_; // = nullptr
templateObject->setType(type);
/* Set dummy index property */