Bug 950658 - Clear pending exception in HeapTypeSetKey::instantiate on OOM. r=bhackett

--HG--
extra : rebase_source : 8f8c28f51ee7f08ef822fec5ac590a7d1cfebed7
This commit is contained in:
Christian Holler 2013-12-16 18:44:55 +01:00
parent 2e0b8a517e
commit b3bced1892

View File

@ -884,8 +884,10 @@ HeapTypeSetKey::instantiate(JSContext *cx)
{ {
if (maybeTypes()) if (maybeTypes())
return true; return true;
if (object()->isSingleObject() && !object()->asSingleObject()->getType(cx)) if (object()->isSingleObject() && !object()->asSingleObject()->getType(cx)) {
cx->clearPendingException();
return false; return false;
}
maybeTypes_ = object()->maybeType()->getProperty(cx, id()); maybeTypes_ = object()->maybeType()->getProperty(cx, id());
return maybeTypes_ != nullptr; return maybeTypes_ != nullptr;
} }