Bug 1361987 - Move setWindowRect to not return from a generator. r?ato draft
authorDavid Burns <dburns@mozilla.com>
Fri, 05 May 2017 20:29:04 +0100
changeset 573474 17923a362800e545f1647fd873a95a818448da28
parent 573473 3b235a68bef2c49dd5587b3bb0593ceaf03c98b5
child 627308 c8ff352d3ac11aa261725384236bf759a1a2b741
push id57400
push userbmo:dburns@mozilla.com
push dateFri, 05 May 2017 20:06:01 +0000
reviewersato
bugs1361987
milestone55.0a1
Bug 1361987 - Move setWindowRect to not return from a generator. r?ato setWindowRect is using `return` from a generator which is not valid javascript. This now populates the response before it is returned to the client. MozReview-Commit-ID: 6vSadp59Nrt
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -1415,17 +1415,17 @@ GeckoDriver.prototype.setWindowRect = fu
         (win.screenX != orig.screenX || win.screenY != orig.screenY)) {
         resolve();
       } else {
         reject();
       }
     });
   }
 
-  return {
+  resp.body = {
     "x": win.screenX,
     "y": win.screenY,
     "width": win.outerWidth,
     "height": win.outerHeight,
   };
 };
 
 /**
@@ -2901,17 +2901,17 @@ GeckoDriver.prototype.maximizeWindow = f
 
     if (win.windowState == win.STATE_MAXIMIZED) {
       win.restore();
     } else {
       win.maximize();
     }
   });
 
-  resp.body.value = {
+  resp.body = {
     x: win.screenX,
     y: win.screenY,
     width: win.outerWidth,
     height: win.outerHeight,
   };
 };
 
 /**