Bug 1189918 - Theme overrides should work in safe mode for comm-central applications too. r=bsmedberg
authorPhilip Chee <philip.chee@gmail.com>
Sun, 25 Oct 2015 01:00:03 +0800
changeset 269409 430fb98d29000430e6566c8187413ecca0ff1c0d
parent 269408 ae3df50e80ed85f22971d2d118ba2a36ee1eb2ec
child 269410 45dd451ce4ed9ccf912f57ee019b237becfc28b8
push id29580
push usercbook@mozilla.com
push dateMon, 26 Oct 2015 09:59:59 +0000
treeherdermozilla-central@5ca03a00d268 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1189918
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1189918 - Theme overrides should work in safe mode for comm-central applications too. r=bsmedberg
toolkit/xre/nsXREDirProvider.cpp
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -644,17 +644,20 @@ nsXREDirProvider::LoadExtensionBundleDir
       if (NS_FAILED(rv))
         return;
 
       RegisterExtensionInterpositions(parser);
       LoadExtensionDirectories(parser, "ExtensionDirs", mExtensionDirectories,
                                NS_EXTENSION_LOCATION);
       LoadExtensionDirectories(parser, "ThemeDirs", mThemeDirectories,
                                NS_SKIN_LOCATION);
-#ifdef MOZ_BUILD_APP_IS_BROWSER
+/* non-Firefox applications that use overrides in their default theme should
+ * define AC_DEFINE(MOZ_SEPARATE_MANIFEST_FOR_THEME_OVERRIDES) in their
+ * configure.in */
+#if defined(MOZ_BUILD_APP_IS_BROWSER) || defined(MOZ_SEPARATE_MANIFEST_FOR_THEME_OVERRIDES)
     } else {
       // In safe mode, still load the default theme directory:
       nsCOMPtr<nsIFile> themeManifest;
       mXULAppDir->Clone(getter_AddRefs(themeManifest));
       themeManifest->AppendNative(NS_LITERAL_CSTRING("extensions"));
       themeManifest->AppendNative(NS_LITERAL_CSTRING("{972ce4c6-7e08-4474-a285-3208198ce6fd}"));
       themeManifest->AppendNative(NS_LITERAL_CSTRING("chrome.manifest"));
       XRE_AddManifestLocation(NS_SKIN_LOCATION, themeManifest);