Skip to content

Commit 218bc97

Browse files
committed
Bug 1853807 - Recheck distribution.ini if executable location has changed. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D192874
1 parent 915b2f8 commit 218bc97

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

browser/components/distribution.sys.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,14 @@ DistributionCustomizer.prototype = {
5353
PREF_CACHED_FILE_APPVERSION,
5454
"unknown"
5555
);
56-
if (knownForVersion == AppConstants.MOZ_APP_VERSION) {
56+
// StartupCacheInfo isn't available in xpcshell tests.
57+
if (
58+
knownForVersion == AppConstants.MOZ_APP_VERSION &&
59+
(Cu.isInAutomation ||
60+
Cc["@mozilla.org/startupcacheinfo;1"].getService(
61+
Ci.nsIStartupCacheInfo
62+
).FoundDiskCacheOnInit)
63+
) {
5764
return Services.prefs.getBoolPref(PREF_CACHED_FILE_EXISTENCE);
5865
}
5966
}

0 commit comments

Comments
 (0)