mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Get rid of unnecessary FSRef creation in startup path. b=506812 r=vlad
This commit is contained in:
parent
1518dffcdd
commit
4a28606b59
@ -1407,13 +1407,7 @@ XRE_GetBinaryPath(const char* argv0, nsILocalFile* *aResult)
|
||||
if (!bundleURL)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
FSRef fileRef;
|
||||
if (!CFURLGetFSRef(bundleURL, &fileRef)) {
|
||||
CFRelease(bundleURL);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
rv = lfm->InitWithFSRef(&fileRef);
|
||||
rv = lfm->InitWithCFURL(bundleURL);
|
||||
CFRelease(bundleURL);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -1967,7 +1967,7 @@ nsresult nsLocalFile::SetBaseURL(CFURLRef aCFURLRef)
|
||||
::CFRelease(mBaseURL);
|
||||
mBaseURL = aCFURLRef;
|
||||
|
||||
if (!::CFURLGetFileSystemRepresentation(mBaseURL, NO, (UInt8*)mPath, PATH_MAX))
|
||||
if (!::CFURLGetFileSystemRepresentation(mBaseURL, false, (UInt8*)mPath, PATH_MAX))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user