result = mPrefStyleSheet->Init(uri);
result = mPrefStyleSheet->SetURL(uri);
nsresult PresShell::CreatePreferenceStyleSheet(void){  NS_ASSERTION(!mPrefStyleSheet, "prefStyleSheet already exists");  nsresult result = CallCreateInstance(kCSSStyleSheetCID, &mPrefStyleSheet);  if (NS_SUCCEEDED(result)) {    NS_ASSERTION(mPrefStyleSheet, "null but no error");    nsCOMPtr<nsIURI> uri;    result = NS_NewURI(getter_AddRefs(uri), "about:PreferenceStyleSheet", nsnull);    if (NS_SUCCEEDED(result)) {      NS_ASSERTION(uri, "null but no error");      result = mPrefStyleSheet->Init(uri);      if (NS_SUCCEEDED(result)) {        mPrefStyleSheet->SetComplete();        nsCOMPtr<nsIDOMCSSStyleSheet> sheet(do_QueryInterface(mPrefStyleSheet));        if (sheet) {          PRUint32 index;          result = sheet->InsertRule(NS_LITERAL_STRING("@namespace url(http://www.w3.org/1999/xhtml);"),                                     0, &index);          NS_ENSURE_SUCCESS(result, result);        }        mStyleSet->AppendUserStyleSheet(mPrefStyleSheet);      }    }  } else {    result = NS_ERROR_OUT_OF_MEMORY;  }#ifdef DEBUG_attinasi  printf("CreatePrefStyleSheet completed: error=%ld\n",(long)result);#endif  return result;}