summaryrefslogtreecommitdiff
path: root/xpcom
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-04-09 16:53:35 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-04-09 16:53:35 -0500
commit853befa9d5604186c6c452afe07a37d372700e26 (patch)
tree29493ecd6a4dd21ff966c29f4fc20a396ef9d715 /xpcom
parent645c946aa77a55b259bd98de78a6a9d9c342ed94 (diff)
downloadaura-central-853befa9d5604186c6c452afe07a37d372700e26.tar.gz
Revert "Issue %3057 - Part 9: Adjust all callsites for no longer using GetNativePath"
This reverts commit 097fa969802f76530384926e8ef1f56777be3783.
Diffstat (limited to 'xpcom')
-rw-r--r--xpcom/base/nsDumpUtils.cpp4
-rw-r--r--xpcom/build/LateWriteChecks.cpp15
-rw-r--r--xpcom/build/XPCOMInit.cpp7
-rw-r--r--xpcom/components/nsNativeModuleLoader.cpp6
-rw-r--r--xpcom/io/nsLocalFileWin.cpp6
5 files changed, 9 insertions, 29 deletions
diff --git a/xpcom/base/nsDumpUtils.cpp b/xpcom/base/nsDumpUtils.cpp
index df71bde10..1333fdb63 100644
--- a/xpcom/base/nsDumpUtils.cpp
+++ b/xpcom/base/nsDumpUtils.cpp
@@ -324,11 +324,7 @@ FifoWatcher::OpenFd()
}
nsAutoCString path;
-#ifdef XP_WIN
- rv = file->GetPersistentDescriptor(path);
-#else
rv = file->GetNativePath(path);
-#endif
if (NS_WARN_IF(NS_FAILED(rv))) {
return -1;
}
diff --git a/xpcom/build/LateWriteChecks.cpp b/xpcom/build/LateWriteChecks.cpp
index 21fdf325e..f90f98125 100644
--- a/xpcom/build/LateWriteChecks.cpp
+++ b/xpcom/build/LateWriteChecks.cpp
@@ -123,17 +123,10 @@ InitLateWriteChecks()
nsCOMPtr<nsIFile> mozFile;
NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(mozFile));
if (mozFile) {
- nsAutoCString writeObserverPath;
-#ifdef XP_WIN
- nsAutoString U16Path;
- nsresult rv = mozFile->GetPath(U16Path);
- CopyUTF16toUTF8(U16Path, writeObserverPath);
-#else
- // On non-Windows just get the native path.
- nsresult rv = mozFile->GetNativePath(writeObserverPath);
-#endif
- if (NS_SUCCEEDED(rv) && writeObserverPath.get()) {
- sLateWriteObserver = new LateWriteObserver(writeObserverPath.get());
+ nsAutoCString nativePath;
+ nsresult rv = mozFile->GetNativePath(nativePath);
+ if (NS_SUCCEEDED(rv) && nativePath.get()) {
+ sLateWriteObserver = new LateWriteObserver(nativePath.get());
}
}
}
diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp
index 9d1dfd6c5..ce12e326e 100644
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -680,13 +680,10 @@ NS_InitXPCOM2(nsIServiceManager** aResult,
getter_AddRefs(greDir));
MOZ_ASSERT(greDir);
nsAutoCString nativeGREPath;
-#ifdef XP_WIN
- greDir->GetPersistentDescriptor(nativeGREPath);
-#else
greDir->GetNativePath(nativeGREPath);
-#endif
u_setDataDirectory(nativeGREPath.get());
-#endif // MOZ_ICU_DATA_ARCHIVE
+#endif
+
// Initialize the JS engine.
const char* jsInitFailureReason = JS_InitWithFailureDiagnostic();
if (jsInitFailureReason) {
diff --git a/xpcom/components/nsNativeModuleLoader.cpp b/xpcom/components/nsNativeModuleLoader.cpp
index 9be25e2ce..95b8349f1 100644
--- a/xpcom/components/nsNativeModuleLoader.cpp
+++ b/xpcom/components/nsNativeModuleLoader.cpp
@@ -100,13 +100,7 @@ nsNativeModuleLoader::LoadModule(FileLocation& aFile)
}
nsAutoCString filePath;
-#ifdef XP_WIN
- nsAutoString filePathW;
- file->GetPath(filePathW);
- CopyUTF16toUTF8(filePathW, filePath);
-#else
file->GetNativePath(filePath);
-#endif
NativeLoadData data;
diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp
index 0b4c58ec6..2ff05666b 100644
--- a/xpcom/io/nsLocalFileWin.cpp
+++ b/xpcom/io/nsLocalFileWin.cpp
@@ -3564,7 +3564,7 @@ nsLocalFile::SetNativeLeafName(const nsACString& aLeafName)
NS_IMETHODIMP
nsLocalFile::GetNativePath(nsACString& aResult)
{
- NS_WARNING("The GetNativePath API is lossy. Use GetPath!");
+ //NS_WARNING("This API is lossy. Use GetPath !");
nsAutoString tmp;
nsresult rv = GetPath(tmp);
if (NS_SUCCEEDED(rv)) {
@@ -3578,7 +3578,7 @@ nsLocalFile::GetNativePath(nsACString& aResult)
NS_IMETHODIMP
nsLocalFile::GetNativeCanonicalPath(nsACString& aResult)
{
- NS_WARNING("This method is lossy. Use GetCanonicalPath!");
+ NS_WARNING("This method is lossy. Use GetCanonicalPath !");
EnsureShortPath();
NS_CopyUnicodeToNative(mShortWorkingPath, aResult);
return NS_OK;
@@ -3646,7 +3646,7 @@ nsLocalFile::GetNativeTarget(nsACString& aResult)
// Check we are correctly initialized.
CHECK_mWorkingPath();
- NS_WARNING("This API is lossy. Use GetTarget!");
+ NS_WARNING("This API is lossy. Use GetTarget !");
nsAutoString tmp;
nsresult rv = GetTarget(tmp);
if (NS_SUCCEEDED(rv)) {