Bug 927568 - fix misplaced null check in marionette-server.js, r=mdas, a=test-only
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Mon, 21 Oct 2013 10:32:48 -0400
changeset 156279 8d03ec3f5b3bf1ac0a5b63bca24debb11da23512
parent 156278 d6cef9fafeb4d2dc0322a768eccb41a8fd443045
child 156280 5d93aef373ecae9909363de2df9a1dab2080466f
push id68
push userjgriffin@mozilla.com
push dateMon, 04 Nov 2013 14:47:20 +0000
reviewersmdas, test-only
bugs927568
milestone26.0
Bug 927568 - fix misplaced null check in marionette-server.js, r=mdas, a=test-only
testing/marionette/marionette-server.js
--- a/testing/marionette/marionette-server.js
+++ b/testing/marionette/marionette-server.js
@@ -2160,17 +2160,17 @@ MarionetteServerConnection.prototype = {
       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);
 
         //go in here if we're already in a remote frame.
-        if (!listenerWindow || (listenerWindow.location.href != message.json.href) &&
+        if ((!listenerWindow || listenerWindow.location.href != message.json.href) &&
             (this.curBrowser.frameManager.currentRemoteFrame !== null)) {
           // 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)
           // if we're already in a remote frame,
           // or it will point to some random window, which will hopefully 
           // cause an href mismatch.  Currently this only happens
           // in B2G for OOP frames registered in Marionette:switchToFrame, so