Bug 1319596 - Wait for first historychange when starting RDM. r=ochameau
authorJ. Ryan Stinnett <jryans@gmail.com>
Fri, 25 Nov 2016 14:06:38 -0600
changeset 324320 31ecbfd5aa7b8ae4b78f8cb238b15f36c5542a98
parent 324319 dcecd20fd2db6e6271f06837121b287244a55a21
child 324321 e7aad63193d725ddf8a690691969f4de17520f0d
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersochameau
bugs1319596, 1310771
milestone53.0a1
Bug 1319596 - Wait for first historychange when starting RDM. r=ochameau In bug 1310771, the session store process for gathering data from content was changed so that the key "historychange" is used instead of "history". Kept the check for "history" as well, since other places in session store still test for it. MozReview-Commit-ID: 4xF7FkxkriI
devtools/client/responsive.html/browser/tunnel.js
--- a/devtools/client/responsive.html/browser/tunnel.js
+++ b/devtools/client/responsive.html/browser/tunnel.js
@@ -309,17 +309,18 @@ function copyPermanentKey(outer, inner) 
   // outer browser (that we're hiding the inner browser within) as part of its history.
   // We want SessionStore's view of the history for our tab to only have the page content
   // of the inner browser, so we want to hide this message from SessionStore, but we have
   // no direct mechanism to do so.  As a workaround, we wait until the one errant message
   // has gone by, and then we copy the permanentKey after that, since the permanentKey is
   // what SessionStore uses to identify each browser.
   let outerMM = outer[FRAME_LOADER].messageManager;
   let onHistoryEntry = message => {
-    let history = message.data.data.history;
+    let data = message.data.data;
+    let history = data.history || data.historychange;
     if (!history || !history.entries) {
       // Wait for a message that contains history data
       return;
     }
     outerMM.removeMessageListener("SessionStore:update", onHistoryEntry);
     debug("Got session update for outer browser");
     DevToolsUtils.executeSoon(() => {
       debug("Copy inner permanentKey to outer browser");