diff options
Diffstat (limited to 'xpcom/build')
-rw-r--r-- | xpcom/build/LateWriteChecks.cpp | 15 | ||||
-rw-r--r-- | xpcom/build/XPCOMInit.cpp | 6 |
2 files changed, 16 insertions, 5 deletions
diff --git a/xpcom/build/LateWriteChecks.cpp b/xpcom/build/LateWriteChecks.cpp index 7ace9a0fbd..218454c4d3 100644 --- a/xpcom/build/LateWriteChecks.cpp +++ b/xpcom/build/LateWriteChecks.cpp @@ -122,10 +122,17 @@ InitLateWriteChecks() nsCOMPtr<nsIFile> mozFile; NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(mozFile)); if (mozFile) { - nsAutoCString nativePath; - nsresult rv = mozFile->GetNativePath(nativePath); - if (NS_SUCCEEDED(rv) && nativePath.get()) { - sLateWriteObserver = new LateWriteObserver(nativePath.get()); + 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()); } } } diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp index 185a823155..835f250da1 100644 --- a/xpcom/build/XPCOMInit.cpp +++ b/xpcom/build/XPCOMInit.cpp @@ -688,9 +688,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult, getter_AddRefs(greDir)); MOZ_ASSERT(greDir); nsAutoCString nativeGREPath; +#ifdef XP_WIN + greDir->GetPersistentDescriptor(nativeGREPath); +#else greDir->GetNativePath(nativeGREPath); - u_setDataDirectory(nativeGREPath.get()); #endif + u_setDataDirectory(nativeGREPath.get()); +#endif // MOZ_ICU_DATA_ARCHIVE // Initialize the JS engine. const char* jsInitFailureReason = JS_InitWithFailureDiagnostic(); |