if (aIsErrorFatal)   gErrorOpeningUserPrefs = PR_TRUE; }
static nsresult openPrefFile(nsIFile* aFile, PRBool aIsErrorFatal,                             PRBool aIsGlobalContext, PRBool aSkipFirstLine){  nsCOMPtr<nsIInputStream> inStr;  char *readBuf;  PRInt64 llFileSize;  PRUint32 fileSize;  nsresult rv;#if MOZ_TIMELINE  {    nsCAutoString str;    aFile->GetNativePath(str);    NS_TIMELINE_MARK_FUNCTION1("load pref file", str.get());  }#endif  rv = aFile->GetFileSize(&llFileSize);  if (NS_FAILED(rv))    return rv;          LL_L2UI(fileSize, llFileSize); // Converting 64 bit structure to unsigned int  rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), aFile);  if (NS_FAILED(rv))     return rv;          readBuf = (char *)PR_Malloc(fileSize);  if (!readBuf)     return NS_ERROR_OUT_OF_MEMORY;  JS_BeginRequest(gMochaContext);  PRUint32 amtRead = 0;  rv = inStr->Read(readBuf, fileSize, &amtRead);  NS_ASSERTION((amtRead == fileSize), "failed to read the entire prefs file!!"); #ifdef XP_OS2 /* OS/2 workaround - our system editor adds an EOF character */     if (readBuf[amtRead - 1] == 0x1A) {        amtRead--;     } #endif  if (NS_SUCCEEDED(rv)) {    if (!PREF_EvaluateConfigScript(readBuf, amtRead, nsnull, aIsGlobalContext, PR_TRUE,                                   aSkipFirstLine))    {      rv = NS_ERROR_FAILURE;      if (aIsErrorFatal)        // If the user prefs file exists but generates an error,        // don't clobber the file when we try to save it        gErrorOpeningUserPrefs = PR_TRUE;    }  }  PR_Free(readBuf);  JS_EndRequest(gMochaContext);  return rv;        }