Bug 1319237 - Mark yielding functions as generators; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 21 Nov 2016 23:34:05 +0100
changeset 442946 ecaf001fc1da8dce9f97b6c1f8c9187cfeff9af6
parent 442945 7807217154c93f5327dbe53f9c8eefe7b2a72348
child 442947 58e229555bce80def91a538521e8b1db7ef0c365
push id36874
push userbmo:ato@mozilla.com
push dateWed, 23 Nov 2016 16:09:45 +0000
reviewersautomatedtester
bugs1319237
milestone53.0a1
Bug 1319237 - Mark yielding functions as generators; r?automatedtester MozReview-Commit-ID: 1c0I4pFY4Dd
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -851,17 +851,17 @@ GeckoDriver.prototype.executeScript = fu
  *     JavaScript notion of null or undefined.
  *
  * @throws ScriptTimeoutError
  *     If the script was interrupted due to reaching the {@code
  *     scriptTimeout} or default timeout.
  * @throws JavaScriptError
  *     If an Error was thrown whilst evaluating the script.
  */
-GeckoDriver.prototype.executeAsyncScript = function(cmd, resp) {
+GeckoDriver.prototype.executeAsyncScript = function*(cmd, resp) {
   let {script, args, scriptTimeout} = cmd.parameters;
   scriptTimeout = scriptTimeout || this.scriptTimeout;
 
   let opts = {
     sandboxName: cmd.parameters.sandbox,
     newSandbox: !!(typeof cmd.parameters.newSandbox == "undefined") ||
         cmd.parameters.newSandbox,
     filename: cmd.parameters.filename,
@@ -901,17 +901,17 @@ GeckoDriver.prototype.execute_ = functio
 };
 
 /**
  * Execute pure JavaScript.  Used to execute simpletest harness tests,
  * which are like mochitests only injected using Marionette.
  *
  * Scripts are expected to call the {@code finish} global when done.
  */
-GeckoDriver.prototype.executeJSScript = function(cmd, resp) {
+GeckoDriver.prototype.executeJSScript = function*(cmd, resp) {
   let {script, args, scriptTimeout} = cmd.parameters;
   scriptTimeout = scriptTimeout || this.scriptTimeout;
 
   let opts = {
     filename: cmd.parameters.filename,
     line: cmd.parameters.line,
     async: cmd.parameters.async,
   };