Bug 1036110 - Stop the B2G UI setting from overriding the js prefs setting and turning off logging. r=dougt, a=1.4+
authorGarvan Keeley <garvankeeley@gmail.com>
Wed, 09 Jul 2014 09:14:00 -0400
changeset 207835 2ace7164be11ada5ed827a0f11ade581c19e0f2d
parent 207834 5a30769e14ceba942bb00d51b907f83f698f4c5a
child 207836 787768129673899ffe3fa2d87ed530b376a1c370
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt, 1
bugs1036110
milestone32.0a2
Bug 1036110 - Stop the B2G UI setting from overriding the js prefs setting and turning off logging. r=dougt, a=1.4+ If gLoggingEnabled is already on during startup, that means it was set in js prefs.
dom/system/NetworkGeolocationProvider.js
--- a/dom/system/NetworkGeolocationProvider.js
+++ b/dom/system/NetworkGeolocationProvider.js
@@ -288,17 +288,19 @@ WifiGeoPositionProvider.prototype = {
   startup:  function() {
     if (this.started)
       return;
 
     this.started = true;
     let self = this;
     let settingsCallback = {
       handle: function(name, result) {
-        if (name == SETTINGS_DEBUG_ENABLED) {
+        // Stop the B2G UI setting from overriding the js prefs setting, and turning off logging
+        // If gLoggingEnabled is already on during startup, that means it was set in js prefs.
+        if (name == SETTINGS_DEBUG_ENABLED && !gLoggingEnabled) {
           gLoggingEnabled = result;
         } else if (name == SETTINGS_WIFI_ENABLED) {
           gWifiScanningEnabled = result;
           if (self.wifiService) {
             self.wifiService.stopWatching(self);
           }
           if (gWifiScanningEnabled) {
             self.wifiService = Cc["@mozilla.org/wifi/monitor;1"].getService(Ci.nsIWifiMonitor);