if (NS_OK != NS_NewISupportsArray(&mRules))
if (NS_OK != NS_NewISupportsArray(mRules.AssignPtr()))
void CSSStyleSheetImpl::PrependStyleRule(nsICSSStyleRule* aRule){  NS_PRECONDITION(nsnull != aRule, "null arg");  //XXX replace this with a binary search?  PRInt32 weight = aRule->GetWeight();  if (nsnull == mRules) {    if (NS_OK != NS_NewISupportsArray(&mRules))      return;  }  PRInt32 index = mRules->Count();  while (0 <= --index) {    nsICSSStyleRule* rule = (nsICSSStyleRule*)mRules->ElementAt(index);    if (rule->GetWeight() > weight) { // insert before rules with equal or lesser weight      NS_RELEASE(rule);      break;    }    NS_RELEASE(rule);  }  mRules->InsertElementAt(aRule, index + 1);}