Bug 1451670: Read the changed flag from startup JSON location data. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Thu, 05 Apr 2018 14:01:38 -0700
changeset 778125 03600327d50cb781825ef68d39c53cf1e7473461
parent 778124 de6c81604f18f3f12e4815c30bc738b457cfc74f
push id105393
push usermaglione.k@gmail.com
push dateThu, 05 Apr 2018 21:01:49 +0000
reviewersaswan
bugs1451670
milestone61.0a1
Bug 1451670: Read the changed flag from startup JSON location data. r?aswan MozReview-Commit-ID: tgfQDvyEj3
toolkit/mozapps/extensions/internal/XPIProvider.jsm
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -1329,16 +1329,17 @@ class XPIState {
  */
 class XPIStateLocation extends Map {
   constructor(name, path, saved = {}) {
     super();
 
     this.name = name;
     this.path = path || saved.path || null;
     this.staged = saved.staged || {};
+    this.changed = saved.changed || false;
     this.dir = this.path && new nsIFile(this.path);
 
     for (let [id, data] of Object.entries(saved.addons || {})) {
       let xpiState = this._addState(id, data);
       // Make a note that this state was restored from saved data.
       xpiState.wasRestored = true;
     }
   }