Bug 1059007 - Use useCapture for MozStorageChanged events (r=ttaubert)
authorBill McCloskey <wmccloskey@mozilla.com>
Thu, 28 Aug 2014 13:37:16 -0700
changeset 223896 5f61c734e372c438b4660fb1a0ada397ef9d2365
parent 223895 e3d2f4788a38dc05529ba98a4ddbdd0b912eb345
child 223897 b9de6514b9940f66ae6b07157216f6222cb91bca
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs1059007
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1059007 - Use useCapture for MozStorageChanged events (r=ttaubert)
browser/components/sessionstore/content/content-sessionStore.js
browser/components/sessionstore/test/content.js
--- a/browser/components/sessionstore/content/content-sessionStore.js
+++ b/browser/components/sessionstore/content/content-sessionStore.js
@@ -466,17 +466,17 @@ let DocShellCapabilitiesListener = {
  * message to the parent process containing up-to-date sessionStorage data.
  *
  * Causes a SessionStore:update message to be sent that contains the current
  * DOMSessionStorage contents. The data is a nested object using host names
  * as keys and per-host DOMSessionStorage data as values.
  */
 let SessionStorageListener = {
   init: function () {
-    addEventListener("MozStorageChanged", this);
+    addEventListener("MozStorageChanged", this, true);
     Services.obs.addObserver(this, "browser:purge-domain-data", false);
     gFrameTree.addObserver(this);
   },
 
   uninit: function () {
     Services.obs.removeObserver(this, "browser:purge-domain-data");
   },
 
--- a/browser/components/sessionstore/test/content.js
+++ b/browser/components/sessionstore/test/content.js
@@ -70,17 +70,17 @@ docShell.QueryInterface(Ci.nsIWebNavigat
  */
 
 addEventListener("hashchange", function () {
   sendAsyncMessage("ss-test:hashchange");
 });
 
 addEventListener("MozStorageChanged", function () {
   sendSyncMessage("ss-test:MozStorageChanged");
-});
+}, true);
 
 addMessageListener("ss-test:modifySessionStorage", function (msg) {
   for (let key of Object.keys(msg.data)) {
     content.sessionStorage[key] = msg.data[key];
   }
 });
 
 addMessageListener("ss-test:modifySessionStorage2", function (msg) {