PostEvaluateScript(bodyPresent);
NS_ASSERTION(NS_SUCCEEDED(rv), "Could not convert Script input to Unicode!"); nsAutoString jsUnicodeBuffer(CBufDescriptor(unicodeString, PR_TRUE, unicodeLength+1, unicodeLength));  if (NS_OK == aStatus) { PRBool bodyPresent = PreEvaluateScript();   nsCOMPtr<nsISupports> owner; aLoader->GetOwner(getter_AddRefs(owner)); if (owner) { nsCOMPtr<nsIPrincipal> prin = do_QueryInterface(owner, &rv); if (NS_FAILED(rv)) return rv; rv = mDocument->AddPrincipal(prin); if (NS_FAILED(rv)) return rv; }  rv = EvaluateScript(jsUnicodeBuffer, mScriptURI, 1, mScriptLanguageVersion); if (NS_FAILED(rv)) return rv;  PostEvaluateScript(bodyPresent);  }
HTMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader,                                  nsISupports* aContext,                                  nsresult aStatus,                                  PRUint32 stringLen,                                  const char* string){  nsresult rv = NS_OK;  nsString aData(string, stringLen);  if (NS_OK == aStatus) {    PRBool bodyPresent = PreEvaluateScript();        //-- Merge the principal of the script file with that of the document    nsCOMPtr<nsISupports> owner;    aLoader->GetOwner(getter_AddRefs(owner));    if (owner)    {      nsCOMPtr<nsIPrincipal> prin = do_QueryInterface(owner, &rv);      if (NS_FAILED(rv)) return rv;      rv = mDocument->AddPrincipal(prin);      if (NS_FAILED(rv)) return rv;    }    rv = EvaluateScript(aData, mScriptURI, 1, mScriptLanguageVersion);    if (NS_FAILED(rv)) return rv;    PostEvaluateScript(bodyPresent);  }  rv = ResumeParsing();  if (NS_FAILED(rv)) return rv;  // We added a reference when the loader was created. This  // release should destroy it.  NS_RELEASE(aLoader);  return rv;}