mLoaded = NS_SUCCEEDED(rv);
NS_ASSERTION(NS_SUCCEEDED(rv) && in, "Error in OpenBlockingStream"); NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && in, NS_ERROR_FAILURE);  mProps = do_CreateInstance(kPersistentPropertiesCID, &rv); NS_ENSURE_SUCCESS(rv, rv);  mAttemptedLoad = mLoaded = PR_TRUE; rv = mProps->Load(in);  mLoaded = NS_SUCCEEDED(rv); #endif
nsStringBundle::LoadProperties(){  // this is different than mLoaded, because we only want to attempt  // to load once  // we only want to load once, but if we've tried once and failed,  // continue to throw an error!  if (mAttemptedLoad) {    if (mLoaded)      return NS_OK;    else      return NS_ERROR_UNEXPECTED;  }    mAttemptedLoad = PR_TRUE;  nsresult rv;  // do it synchronously  nsCOMPtr<nsIURI> uri;  rv = NS_NewURI(getter_AddRefs(uri), mPropertiesURL);  if (NS_FAILED(rv)) return rv;  // We don't use NS_OpenURI because we want to tweak the channel  nsCOMPtr<nsIChannel> channel;  rv = NS_NewChannel(getter_AddRefs(channel), uri);  if (NS_FAILED(rv)) return rv;  nsCOMPtr<nsIInputStream> in;  rv = channel->Open(getter_AddRefs(in));  if (NS_FAILED(rv)) return rv;  // It's a string bundle.  We know what MIME type it is!  channel->SetContentType(NS_LITERAL_CSTRING("text/plain"));    NS_TIMELINE_MARK_FUNCTION("loading properties");  NS_ASSERTION(NS_SUCCEEDED(rv) && in, "Error in OpenBlockingStream");  NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && in, NS_ERROR_FAILURE);      mProps = do_CreateInstance(kPersistentPropertiesCID, &rv);  NS_ENSURE_SUCCESS(rv, rv);    mAttemptedLoad = mLoaded = PR_TRUE;  rv = mProps->Load(in);  mLoaded = NS_SUCCEEDED(rv);    return rv;}