mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
OOM check. r+sr=bzbarsky b=188803
This commit is contained in:
parent
6560910dc0
commit
146a7a98ed
@ -985,6 +985,8 @@ DOMCSSDeclarationImpl::DeclarationChanged()
|
||||
|
||||
nsCOMPtr<nsICSSStyleRule> oldRule = mRule;
|
||||
mRule = oldRule->DeclarationChanged(PR_TRUE).get();
|
||||
if (!mRule)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
nsrefcnt cnt = mRule->Release();
|
||||
NS_ASSERTION(cnt != 0, "container didn't take ownership");
|
||||
|
||||
|
@ -985,6 +985,8 @@ DOMCSSDeclarationImpl::DeclarationChanged()
|
||||
|
||||
nsCOMPtr<nsICSSStyleRule> oldRule = mRule;
|
||||
mRule = oldRule->DeclarationChanged(PR_TRUE).get();
|
||||
if (!mRule)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
nsrefcnt cnt = mRule->Release();
|
||||
NS_ASSERTION(cnt != 0, "container didn't take ownership");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user