Bug 1319237 - Mark yielding functions as generators; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 21 Nov 2016 23:34:05 +0100
changeset 443649 43832af4d5f092d9432433c10bc11bd87aa27827
parent 443648 2973dea81d7ccff5863788f21901dffeb8f4b023
child 443650 3f176194164eda8d298a898f5087fb2be3265534
push id37046
push userbmo:ato@mozilla.com
push dateThu, 24 Nov 2016 20:08:27 +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
@@ -854,17 +854,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,
@@ -904,17 +904,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,
   };