Bug 1776893 - Replace do_CreateInstance for nsIFile with NS_NewLocalFile (part 2) r=emilio,necko-reviewers,win-reviewers,handyman,valentin
Differential Revision: https://phabricator.services.mozilla.com/D227297
This commit is contained in:
@@ -346,10 +346,8 @@ UploadLastDir::ContentPrefCallback::HandleCompletion(uint16_t aReason) {
|
||||
}
|
||||
|
||||
if (!prefStr.IsEmpty()) {
|
||||
localFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID);
|
||||
if (localFile && NS_WARN_IF(NS_FAILED(localFile->InitWithPath(prefStr)))) {
|
||||
localFile = nullptr;
|
||||
}
|
||||
nsresult rv = NS_NewLocalFile(prefStr, getter_AddRefs(localFile));
|
||||
(void)NS_WARN_IF(NS_FAILED(rv));
|
||||
}
|
||||
|
||||
if (localFile) {
|
||||
|
||||
Reference in New Issue
Block a user