Bug 1127557 - Invalid preference type getting/setting loop.ot.guid. r=jaws, a=sledru
authorMark Banner <standard8@mozilla.com>
Mon, 02 Feb 2015 12:32:54 +0000
changeset 243695 4155bf349dbb
parent 243694 3be92206bfd0
child 243696 a5992bd7d600
push id4440
push userryanvm@gmail.com
push date2015-02-05 16:07 +0000
treeherdermozilla-beta@74c4e5bdde78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, sledru
bugs1127557
milestone36.0
Bug 1127557 - Invalid preference type getting/setting loop.ot.guid. r=jaws, a=sledru
browser/components/loop/content/js/conversation.js
browser/components/loop/content/js/conversation.jsx
--- a/browser/components/loop/content/js/conversation.js
+++ b/browser/components/loop/content/js/conversation.js
@@ -626,17 +626,19 @@ loop.conversation = (function(mozL10n) {
 
     // Plug in an alternate client ID mechanism, as localStorage and cookies
     // don't work in the conversation window
     window.OT.overrideGuidStorage({
       get: function(callback) {
         callback(null, navigator.mozLoop.getLoopPref("ot.guid"));
       },
       set: function(guid, callback) {
-        navigator.mozLoop.setLoopPref("ot.guid", guid);
+        // See nsIPrefBranch
+        const PREF_STRING = 32;
+        navigator.mozLoop.setLoopPref("ot.guid", guid, PREF_STRING);
         callback(null);
       }
     });
 
     var dispatcher = new loop.Dispatcher();
     var client = new loop.Client();
     var sdkDriver = new loop.OTSdkDriver({
       dispatcher: dispatcher,
--- a/browser/components/loop/content/js/conversation.jsx
+++ b/browser/components/loop/content/js/conversation.jsx
@@ -626,17 +626,19 @@ loop.conversation = (function(mozL10n) {
 
     // Plug in an alternate client ID mechanism, as localStorage and cookies
     // don't work in the conversation window
     window.OT.overrideGuidStorage({
       get: function(callback) {
         callback(null, navigator.mozLoop.getLoopPref("ot.guid"));
       },
       set: function(guid, callback) {
-        navigator.mozLoop.setLoopPref("ot.guid", guid);
+        // See nsIPrefBranch
+        const PREF_STRING = 32;
+        navigator.mozLoop.setLoopPref("ot.guid", guid, PREF_STRING);
         callback(null);
       }
     });
 
     var dispatcher = new loop.Dispatcher();
     var client = new loop.Client();
     var sdkDriver = new loop.OTSdkDriver({
       dispatcher: dispatcher,