From 2c7514e9bad6bbc168a00f569d94f39cdae683f8 Mon Sep 17 00:00:00 2001 From: "dolske%mozilla.com" Date: Thu, 10 Jan 2008 06:01:38 +0000 Subject: [PATCH] Bug 386748 - Warning on Startup: NS_ENSURE_TRUE(compMgr) failed. r=benjamin, a1.9=schrep --- toolkit/xre/nsXREDirProvider.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp index 63827a0c2e4..3b64a7d8616 100644 --- a/toolkit/xre/nsXREDirProvider.cpp +++ b/toolkit/xre/nsXREDirProvider.cpp @@ -240,11 +240,14 @@ nsXREDirProvider::GetFile(const char* aProperty, PRBool* aPersistent, !strcmp(aProperty, XRE_USER_APP_DATA_DIR)) { rv = GetUserAppDataDirectory((nsILocalFile**)(nsIFile**) getter_AddRefs(file)); } -#ifdef XP_WIN else if (!strcmp(aProperty, XRE_UPDATE_ROOT_DIR)) { +#ifdef XP_WIN rv = GetUpdateRootDir(getter_AddRefs(file)); - } +#else + // Only supported on Windows, so just immediately fail. + return NS_ERROR_FAILURE; #endif + } else if (!strcmp(aProperty, NS_APP_APPLICATION_REGISTRY_FILE)) { rv = GetUserAppDataDirectory((nsILocalFile**)(nsIFile**) getter_AddRefs(file)); if (NS_SUCCEEDED(rv))