Bug 1302503 - Allow quitApplication to be called without flags; r=automatedtester
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 13 Sep 2016 19:20:39 +0100
changeset 357368 bd83454dcec344145cf3c1b43bc6fb13f1b745b9
parent 357367 9590f183073b871bc6b9577752e1479046b0fb81
child 357369 c6edbdd09f304b3c092cc58ee16e7d1901837434
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester
bugs1302503
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1302503 - Allow quitApplication to be called without flags; r=automatedtester MozReview-Commit-ID: 5ctSN5vZbSQ
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -2571,17 +2571,17 @@ GeckoDriver.prototype._checkIfAlertIsPre
  * session.
  */
 GeckoDriver.prototype.quitApplication = function(cmd, resp) {
   if (this.appName != "Firefox") {
     throw new WebDriverError("In app initiated quit only supported in Firefox");
   }
 
   let flags = Ci.nsIAppStartup.eAttemptQuit;
-  for (let k of cmd.parameters.flags) {
+  for (let k of cmd.parameters.flags || []) {
     flags |= Ci.nsIAppStartup[k];
   }
 
   this.stopSignal_();
   resp.send();
 
   this.sessionTearDown();
   Services.startup.quit(flags);