Bug 1533679 - Implement Browser.close. r=ato
authorAlexandre Poirot <poirot.alex@gmail.com>
Sun, 10 Mar 2019 12:51:05 +0000
changeset 521283 13431774ebecef49330788fdd19fa2fd61c5eb06
parent 521282 600543aa900a140ddff9169e1561fcfa75029d55
child 521284 735dcab78c931e2597907aebc043f0314af50e12
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1533679
milestone67.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 1533679 - Implement Browser.close. r=ato Depends on D22689 Differential Revision: https://phabricator.services.mozilla.com/D22690
remote/domains/parent/Browser.jsm
--- a/remote/domains/parent/Browser.jsm
+++ b/remote/domains/parent/Browser.jsm
@@ -1,21 +1,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["Browser"];
 
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const {Domain} = ChromeUtils.import("chrome://remote/content/domains/Domain.jsm");
 
 class Browser extends Domain {
   getVersion() {
     return {
       protocolVersion: "1",
       product: "Firefox",
       revision: "1",
       userAgent: "Firefox",
       jsVersion: "1.8.5",
     };
   }
+
+  close() {
+    Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit);
+  }
 }