Bug 1291524 - Load correct containers data in ensureDataReady method. r=paolo, a=ritu
authorJonathan Kingston <jkt@mozilla.com>
Fri, 05 Aug 2016 15:33:06 +0100
changeset 347823 9b637ce2fc3a1bb887e2c10fcdf597485ddaec20
parent 347822 c3efd7828d05bb960533675df49c43b8c63ca522
child 347824 a353fc4095ca9a489b4ef728607a42d630a20477
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaolo, ritu
bugs1291524
milestone50.0a2
Bug 1291524 - Load correct containers data in ensureDataReady method. r=paolo, a=ritu MozReview-Commit-ID: EduImX01Nzd
toolkit/components/contextualidentity/ContextualIdentityService.jsm
--- a/toolkit/components/contextualidentity/ContextualIdentityService.jsm
+++ b/toolkit/components/contextualidentity/ContextualIdentityService.jsm
@@ -216,18 +216,21 @@ function _ContextualIdentityService(path
     try {
       // This reads the file and automatically detects the UTF-8 encoding.
       let inputStream = Cc["@mozilla.org/network/file-input-stream;1"]
                           .createInstance(Ci.nsIFileInputStream);
       inputStream.init(new FileUtils.File(this._path),
                        FileUtils.MODE_RDONLY, FileUtils.PERMS_FILE, 0);
       try {
         let json = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
-        this._identities = json.decodeFromStream(inputStream,
-                                                 inputStream.available());
+        let data = json.decodeFromStream(inputStream,
+                                         inputStream.available());
+        this._identities = data.identities;
+        this._lastUserContextId = data.lastUserContextId;
+
         this._dataReady = true;
       } finally {
         inputStream.close();
       }
     } catch (error) {
       this.loadError(error);
       return;
     }