Bug 284889 OOM crash [@nsStyleContext::ApplyStyleFixups]

patch by b.jacques@planet.nl r=dbaron sr=dbaron a=bsmedberg
This commit is contained in:
timeless%mozdev.org 2005-07-19 21:03:04 +00:00
parent 605a534168
commit b34557451f

View File

@ -308,6 +308,12 @@ nsStyleContext::GetUniqueStyleData(const nsStyleStructID& aSID)
return nsnull;
}
if (!result) {
NS_WARNING("Ran out of memory while trying to allocate memory for a unique nsStyleStruct! "
"Returning the non-unique data.");
return NS_CONST_CAST(nsStyleStruct*, current);
}
SetStyle(aSID, result);
mBits &= ~nsCachedStyleData::GetBitForSID(aSID);