Bug 929221 - Correctly handle OOM in EnsureTrackPropertyTypes. r=bhackett

This commit is contained in:
Jan de Mooij 2014-01-22 12:26:25 +01:00
parent e917d10bb6
commit f7d388a9d5

View File

@ -387,8 +387,10 @@ EnsureTrackPropertyTypes(JSContext *cx, JSObject *obj, jsid id)
cx->clearPendingException();
return;
}
if (!obj->type()->unknownProperties())
obj->type()->getProperty(cx, id);
if (!obj->type()->unknownProperties() && !obj->type()->getProperty(cx, id)) {
cx->compartment()->types.setPendingNukeTypes(cx);
return;
}
}
JS_ASSERT(obj->type()->unknownProperties() || TrackPropertyTypes(cx, obj, id));