diff options
author | Moonchild <moonchild@palemoon.org> | 2022-02-03 17:11:21 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-02-03 17:11:21 +0000 |
commit | 097fa969802f76530384926e8ef1f56777be3783 (patch) | |
tree | 8f01134d7c464a164707ce81a47d3a418eef0019 /dom | |
parent | 56b8a05db34fabefad74e20876309263066b5bce (diff) | |
download | aura-central-097fa969802f76530384926e8ef1f56777be3783.tar.gz |
Issue %3057 - Part 9: Adjust all callsites for no longer using GetNativePath
Depending on context, various solutions were used.
Diffstat (limited to 'dom')
-rw-r--r-- | dom/plugins/base/nsPluginHost.cpp | 10 | ||||
-rw-r--r-- | dom/plugins/base/nsPluginStreamListenerPeer.cpp | 4 | ||||
-rw-r--r-- | dom/plugins/base/nsPluginsDirWin.cpp | 2 | ||||
-rw-r--r-- | dom/xul/nsXULPrototypeCache.cpp | 4 |
4 files changed, 18 insertions, 2 deletions
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index b36bf9633..a7363de43 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -2022,10 +2022,14 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, #ifdef PLUGIN_LOGGING nsAutoCString dirPath; +#ifdef XP_WIN + pluginsDir->GetPersistentDescriptor(dirPath); +#else pluginsDir->GetNativePath(dirPath); +#endif PLUGIN_LOG(PLUGIN_LOG_BASIC, ("nsPluginHost::ScanPluginsDirectory dir=%s\n", dirPath.get())); -#endif +#endif // PLUGIN_LOGGING nsCOMPtr<nsISimpleEnumerator> iter; rv = pluginsDir->GetDirectoryEntries(getter_AddRefs(iter)); @@ -3600,7 +3604,11 @@ nsPluginHost::CreateTempFileToPost(const char *aPostDataURL, nsIFile **aTmpFile) } rv = inFile->GetFileSize(&fileSize); if (NS_FAILED(rv)) return rv; +#ifdef XP_WIN + rv = inFile->GetPersistentDescriptor(filename); +#else rv = inFile->GetNativePath(filename); +#endif if (NS_FAILED(rv)) return rv; if (fileSize != 0) { diff --git a/dom/plugins/base/nsPluginStreamListenerPeer.cpp b/dom/plugins/base/nsPluginStreamListenerPeer.cpp index 603f2408c..7ee5cd7fb 100644 --- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp +++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp @@ -1265,7 +1265,11 @@ nsPluginStreamListenerPeer::OnFileAvailable(nsIFile* aFile) return NS_ERROR_FAILURE; nsAutoCString path; +#ifdef XP_WIN + rv = aFile->GetPersistentDescriptor(path); +#else rv = aFile->GetNativePath(path); +#endif if (NS_FAILED(rv)) return rv; if (path.IsEmpty()) { diff --git a/dom/plugins/base/nsPluginsDirWin.cpp b/dom/plugins/base/nsPluginsDirWin.cpp index 8c2d26ca2..5a2d85f29 100644 --- a/dom/plugins/base/nsPluginsDirWin.cpp +++ b/dom/plugins/base/nsPluginsDirWin.cpp @@ -239,7 +239,7 @@ static bool CanLoadPlugin(char16ptr_t aBinaryPath) bool nsPluginsDir::IsPluginFile(nsIFile* file) { nsAutoCString path; - if (NS_FAILED(file->GetNativePath(path))) + if (NS_FAILED(file->GetPersistentDescriptor(path))) return false; const char *cPath = path.get(); diff --git a/dom/xul/nsXULPrototypeCache.cpp b/dom/xul/nsXULPrototypeCache.cpp index 5644405f5..8f08ae544 100644 --- a/dom/xul/nsXULPrototypeCache.cpp +++ b/dom/xul/nsXULPrototypeCache.cpp @@ -466,7 +466,11 @@ nsXULPrototypeCache::BeginCaching(nsIURI* aURI) if (NS_FAILED(rv)) return rv; nsAutoCString chromePath; +#ifdef XP_WIN + rv = chromeDir->GetPersistentDescriptor(chromePath); +#else rv = chromeDir->GetNativePath(chromePath); +#endif if (NS_FAILED(rv)) return rv; |