Bug 802063 - [Settings] Won't remember the Data Connection status after reboot. r=gwagner a=blocking-basecamp
authorVivien Nicolas <21@vingtetun.org>
Thu, 25 Oct 2012 15:02:15 +0200
changeset 116716 d782479f28383e712b4ed101688978da32df9d2f
parent 116715 6cfcecb75844139334d5d10b1b69c0c3ab4b6e39
child 116717 eab0a3d65b1e1d68d78930ebdfb381179c57d7af
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgwagner, blocking-basecamp
bugs802063
milestone18.0a2
Bug 802063 - [Settings] Won't remember the Data Connection status after reboot. r=gwagner a=blocking-basecamp
dom/settings/SettingsManager.js
--- a/dom/settings/SettingsManager.js
+++ b/dom/settings/SettingsManager.js
@@ -104,17 +104,17 @@ SettingsLock.prototype = {
 
             for (var i in event.target.result) {
               let result = event.target.result[i];
               var name = result.settingName;
               var value = result.settingValue;
               results[name] = value;
               results.__exposedProps__[name] = "r";
               // If the value itself is an object, expose the properties.
-              if (typeof value == "object") {
+              if (typeof value == "object" && value != null) {
                 var exposed = {};
                 Object.keys(value).forEach(function(key) { exposed[key] = 'r'; });
                 results[name].__exposedProps__ = exposed;
               }
             }
 
             this._open = true;
             Services.DOMRequest.fireSuccess(request, results);