Bug 961785 - DataStoreChangeNotification should not check the appStatus when the client is shutting down. r=ehsan, a=1.3+
☠☠ backed out by 343a400dfc4a ☠ ☠
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 22 Jan 2014 10:19:23 +0000
changeset 175946 b3cfcb0fe2efdda059e7c01af996743dbeb2f1d3
parent 175945 bc7764b0d190238d2a7fdc3ed60d1e40a830949c
child 175947 243d1045401aa255d0588f13d8c78586ea361cf0
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, 1
bugs961785
milestone28.0a2
Bug 961785 - DataStoreChangeNotification should not check the appStatus when the client is shutting down. r=ehsan, a=1.3+
dom/datastore/DataStoreChangeNotifier.jsm
--- a/dom/datastore/DataStoreChangeNotifier.jsm
+++ b/dom/datastore/DataStoreChangeNotifier.jsm
@@ -63,18 +63,22 @@ this.DataStoreChangeNotifier = {
         obj.mm.sendAsyncMessage(aMsgName, aData.message);
       }
     });
   },
 
   receiveMessage: function(aMessage) {
     debug("receiveMessage");
 
+    // No check has to be done when the message is 'child-process-shutdown'
+    // because at this point the target is already disconnected from
+    // nsFrameMessageManager, so that assertAppHasStatus will always fail.
     let prefName = 'dom.testing.datastore_enabled_for_hosted_apps';
-    if ((Services.prefs.getPrefType(prefName) == Services.prefs.PREF_INVALID ||
+    if (aMessage.name != 'child-process-shutdown' &&
+        (Services.prefs.getPrefType(prefName) == Services.prefs.PREF_INVALID ||
          !Services.prefs.getBoolPref(prefName)) &&
         !aMessage.target.assertAppHasStatus(Ci.nsIPrincipal.APP_STATUS_CERTIFIED)) {
       return;
     }
 
     switch (aMessage.name) {
       case "DataStore:Changed":
         this.broadcastMessage("DataStore:Changed:Return:OK", aMessage.data);