Bug 917685 - Let complex overrides take precedence over pref overrides; r=dao
authorJim Chen <nchen@mozilla.com>
Wed, 16 Oct 2013 10:51:23 -0400
changeset 165730 60185e9edfd42d2d98d8252cb14b78b7e7ce2170
parent 165729 0f25523048c391f3b9d37a3369a5e1aba9e8c23a
child 165731 08a84b46802138ec218dea333ae2e0ff8b4be7e4
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs917685
milestone27.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 917685 - Let complex overrides take precedence over pref overrides; r=dao
netwerk/protocol/http/UserAgentOverrides.jsm
--- a/netwerk/protocol/http/UserAgentOverrides.jsm
+++ b/netwerk/protocol/http/UserAgentOverrides.jsm
@@ -51,17 +51,18 @@ this.UserAgentOverrides = {
       gUpdatedOverrides = overrides;
     });
 
     buildOverrides();
     gInitialized = true;
   },
 
   addComplexOverride: function uao_addComplexOverride(callback) {
-    gOverrideFunctions.push(callback);
+    // Add to front of array so complex overrides have precedence
+    gOverrideFunctions.unshift(callback);
   },
 
   getOverrideForURI: function uao_getOverrideForURI(aURI) {
     if (!gInitialized ||
         (!gOverrides.size && !gUpdatedOverrides) ||
         !(aURI instanceof Ci.nsIStandardURL))
       return null;