if (!mInner || !mInner->mURL) {    NS_ERROR("ContainsStyleSheet called on a sheet that's still loading"); aContains = PR_FALSE; return NS_OK; }
CSSStyleSheetImpl::ContainsStyleSheet(nsIURI* aURL, PRBool& aContains, nsIStyleSheet** aTheChild /*=nsnull*/){  NS_PRECONDITION(nsnull != aURL, "null arg");  // first check ourself out  nsresult rv = mInner->mURL->Equals(aURL, &aContains);  if (NS_FAILED(rv)) aContains = PR_FALSE;  if (aContains) {    // if we found it and the out-param is there, set it and addref    if (aTheChild) {      rv = QueryInterface( NS_GET_IID(nsIStyleSheet), (void **)aTheChild);    }  } else {    CSSStyleSheetImpl*  child = mFirstChild;    // now check the chil'ins out (recursively)    while ((PR_FALSE == aContains) && (nsnull != child)) {      child->ContainsStyleSheet(aURL, aContains, aTheChild);      if (aContains) {        break;      } else {        child = child->mNext;      }    }  }  // NOTE: if there are errors in the above we are handling them locally   //       and not promoting them to the caller  return NS_OK;}