Bug 861495 - Transplant getOuterWindowWithId from nsIDOMWindowUtils to a window-related service: webrtcUI.jsm. r=dolske
authorColby Russell <Sevenspade@gmail.com>
Tue, 07 May 2013 12:34:21 -0400
changeset 141966 9db0e05ead332ea7fcca44cf06474b9dfb138d67
parent 141965 85a400cff75fc32541b5db1068c547189c8bc937
child 141967 76107e8b0df98b8cdca2f0a47c10cc2d7c0b5f94
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske
bugs861495
milestone23.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 861495 - Transplant getOuterWindowWithId from nsIDOMWindowUtils to a window-related service: webrtcUI.jsm. r=dolske
browser/modules/webrtcUI.jsm
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -52,20 +52,17 @@ this.webrtcUI = {
         });
       }
     }
     return activeStreams;
   }
 }
 
 function getBrowserForWindowId(aWindowID) {
-  let someWindow = Services.wm.getMostRecentWindow(null);
-  let contentWindow = someWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                                .getInterface(Ci.nsIDOMWindowUtils)
-                                .getOuterWindowWithId(aWindowID);
+  let contentWindow = Services.wm.getOuterWindowWithId(aWindowID);
   return contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIWebNavigation)
                       .QueryInterface(Ci.nsIDocShell)
                       .chromeEventHandler;
 }
 
 function handleRequest(aSubject, aTopic, aData) {
   let {windowID: windowID, callID: callID} = JSON.parse(aData);