Bug 1319237 - Mark yielding functions as generators; r?automatedtester
MozReview-Commit-ID: 1c0I4pFY4Dd
--- 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,
};