From 30341970629580ec5e498a9ebd5a0d712b3a6482 Mon Sep 17 00:00:00 2001 From: Geoff Lankow Date: Thu, 10 Nov 2011 12:08:48 +1300 Subject: [PATCH] Bug 701193 - xpcshell-tests for add-on manager broken when update channel is set to aurora/beta/release; r=dtownsend --- toolkit/mozapps/extensions/AddonRepository.jsm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/toolkit/mozapps/extensions/AddonRepository.jsm b/toolkit/mozapps/extensions/AddonRepository.jsm index 9a417482ce0..f5d6eee4f98 100644 --- a/toolkit/mozapps/extensions/AddonRepository.jsm +++ b/toolkit/mozapps/extensions/AddonRepository.jsm @@ -47,6 +47,7 @@ Components.utils.import("resource://gre/modules/FileUtils.jsm"); Components.utils.import("resource://gre/modules/NetUtil.jsm"); Components.utils.import("resource://gre/modules/Services.jsm"); Components.utils.import("resource://gre/modules/AddonManager.jsm"); +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); var EXPORTED_SYMBOLS = [ "AddonRepository" ]; @@ -64,13 +65,14 @@ const PREF_CHECK_COMPATIBILITY_BASE = "extensions.checkCompatibility"; const BRANCH_REGEXP = /^([^\.]+\.[0-9]+[a-z]*).*/gi; +XPCOMUtils.defineLazyGetter(this, "PREF_CHECK_COMPATIBILITY", function () { #ifdef MOZ_COMPATIBILITY_NIGHTLY -const PREF_CHECK_COMPATIBILITY = PREF_CHECK_COMPATIBILITY_BASE + - ".nightly"; + return PREF_CHECK_COMPATIBILITY_BASE + ".nightly"; #else -const PREF_CHECK_COMPATIBILITY = PREF_CHECK_COMPATIBILITY_BASE + "." + - Services.appinfo.version.replace(BRANCH_REGEXP, "$1"); + return PREF_CHECK_COMPATIBILITY_BASE + "." + + Services.appinfo.version.replace(BRANCH_REGEXP, "$1"); #endif +}); const XMLURI_PARSE_ERROR = "http://www.mozilla.org/newlayout/xml/parsererror.xml";