Bug 1262813 - Fix the getWindowFromHost to allow it gets correct window. r=mratcliffe
authorTim Huang <tihuang@mozilla.com>
Fri, 15 Apr 2016 19:02:00 +0200
changeset 331350 8997f9366f6be67b5ac4c7f2708969549dd29875
parent 331349 0144ac4c80682a864877dd4429df383b0bc07caa
child 331351 2f58e7ce1ab8ff2ed3181a80cb3ac45ee3975799
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmratcliffe
bugs1262813
milestone48.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 1262813 - Fix the getWindowFromHost to allow it gets correct window. r=mratcliffe
devtools/server/actors/storage.js
--- a/devtools/server/actors/storage.js
+++ b/devtools/server/actors/storage.js
@@ -2240,17 +2240,18 @@ var StorageActor = exports.StorageActor 
     return null;
   },
 
   getWindowFromHost: function(host) {
     for (let win of this.childWindowPool.values()) {
       let origin = win.document
                       .nodePrincipal
                       .originNoSuffix;
-      if (origin === host) {
+      let url = win.document.URL;
+      if (origin === host || url === host) {
         return win;
       }
     }
     return null;
   },
 
   /**
    * Event handler for any docshell update. This lets us figure out whenever