Bug 846288 - Silence assert in Label destructor after an OOM. r=dvander

This commit is contained in:
Jan de Mooij 2013-03-12 10:26:15 +01:00
parent 55e5d71b15
commit 91b6b9c3ff

View File

@ -238,9 +238,12 @@ class Label : public LabelBase
{ }
~Label()
{
// Note: the condition is a hack to avoid this assert when OOM testing,
#ifdef DEBUG
// Note: the condition is a hack to silence this assert when OOM testing,
// see bug 756614.
JS_ASSERT_IF(OOM_counter < OOM_maxAllocations, !used());
if (!js_IonOptions.parallelCompilation)
JS_ASSERT_IF(!GetIonContext()->cx->runtime->hadOutOfMemory, !used());
#endif
}
};