Bug 1120809 - Don't fail when trying to retrieve a window from the child process in "Marionette:register".;r=jgriffin
authorChris Manchester <cmanchester@mozilla.com>
Fri, 16 Jan 2015 15:01:37 -0500
changeset 251433 eb735f61a1af60caa1f530aff51cc246cb0bd74d
parent 251432 f498989ed56f3d5b4fae5e2bd1a0ca0c0f99014e
child 251434 b0734bca62e4dca30e6b93433a1fac8bcb43c1bb
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs1120809
milestone38.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 1120809 - Don't fail when trying to retrieve a window from the child process in "Marionette:register".;r=jgriffin
testing/marionette/marionette-server.js
--- a/testing/marionette/marionette-server.js
+++ b/testing/marionette/marionette-server.js
@@ -2928,18 +2928,20 @@ MarionetteServerConnection.prototype = {
         let cookieToDelete = message.json.value;
         cookieManager.remove(cookieToDelete.host, cookieToDelete.name,
                              cookieToDelete.path, false);
         return true;
       case "Marionette:register":
         // This code processes the content listener's registration information
         // and either accepts the listener, or ignores it
         let nullPrevious = (this.curBrowser.curFrameId == null);
-        let listenerWindow =
-                            Services.wm.getOuterWindowWithId(message.json.value);
+        let listenerWindow = null;
+        try {
+          listenerWindow = Services.wm.getOuterWindowWithId(message.json.value);
+        } catch (ex) { }
 
         //go in here if we're already in a remote frame.
         if (this.curBrowser.frameManager.currentRemoteFrame !== null &&
             (!listenerWindow ||
              this.messageManager == this.curBrowser.frameManager.currentRemoteFrame.messageManager.get())) {
           // The outerWindowID from an OOP frame will not be meaningful to
           // the parent process here, since each process maintains its own
           // independent window list.  So, it will either be null (!listenerWindow)