OOM check. r+sr=bzbarsky b=188803
git-svn-id: svn://10.0.0.236/trunk@143838 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
76a6fd2bfb
commit
2ec3b927fc
@ -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…
x
Reference in New Issue
Block a user