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

--HG--
extra : rebase_source : e9856f17b41b3763794fbc352d0aa140c0629b77
This commit is contained in:
Christian Holler 2013-12-18 14:38:04 +01:00
parent df8288a6ce
commit 2818e843c6

View File

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