Backed out 3 changesets (bug 1622836, bug 1271842) for mochitest failures on test_prompt.html. CLOSED TREE
authorCosmin Sabou <csabou@mozilla.com>
Tue, 21 Apr 2020 22:06:48 +0300
changeset 525263 b7a400987981a46df5381200e6cb675d702b3c21
parent 525262 f9ec63e4d0b327485625b4a45145a769d304aa2b
child 525264 d7e299be215a40cc88a0d734d6254dffae53fb3c
push id113606
push usercsabou@mozilla.com
push dateTue, 21 Apr 2020 19:20:16 +0000
treeherderautoland@b7a400987981 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1622836, 1271842
milestone77.0a1
backs outcdedf7ddec475911cc96e4e88825c91639d249cc
7262ae6d42ecb8d24245a6ad37a0d786a12da058
091a64a381364b0b8172f34b6c020e9d2a704d99
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
Backed out 3 changesets (bug 1622836, bug 1271842) for mochitest failures on test_prompt.html. CLOSED TREE Backed out changeset cdedf7ddec47 (bug 1622836) Backed out changeset 7262ae6d42ec (bug 1271842) Backed out changeset 091a64a38136 (bug 1271842)
browser/actors/PromptParent.jsm
docs/conf.py
toolkit/components/prompts/docs/index.rst
toolkit/components/prompts/docs/modal-type-content.png
toolkit/components/prompts/docs/modal-type-tab.png
toolkit/components/prompts/docs/modal-type-window.png
toolkit/components/prompts/docs/modalTypes.rst
toolkit/components/prompts/docs/nsIPromptService-reference.rst
toolkit/components/prompts/docs/nsIPromptService.rst
toolkit/components/prompts/moz.build
toolkit/components/prompts/src/Prompter.jsm
toolkit/components/prompts/test/chrome.ini
toolkit/components/prompts/test/mochitest.ini
toolkit/components/prompts/test/prompt_common.js
toolkit/components/prompts/test/test_modal_prompts.html
toolkit/components/prompts/test/test_modal_select.html
toolkit/components/windowwatcher/nsIPromptService.idl
toolkit/docs/index.rst
toolkit/modules/BrowserUtils.jsm
--- a/browser/actors/PromptParent.jsm
+++ b/browser/actors/PromptParent.jsm
@@ -249,17 +249,17 @@ class PromptParent extends JSWindowActor
    * @param {BrowsingContext} browsingContext
    *        The BrowsingContext from which the request to open the window-modal
    *        prompt came.
    * @return {Promise}
    *         Resolves when the window prompt is dismissed.
    * @resolves {Object}
    *           The arguments returned from the window prompt.
    */
-  async openWindowPrompt(args, browsingContext = this.browsingContext) {
+  openWindowPrompt(args, browsingContext = this.browsingContext) {
     const COMMON_DIALOG = "chrome://global/content/commonDialog.xhtml";
     const SELECT_DIALOG = "chrome://global/content/selectDialog.xhtml";
     let uri = args.promptType == "select" ? SELECT_DIALOG : COMMON_DIALOG;
 
     let browser = browsingContext.top.embedderElement;
     // If can't get the browser, because the BC does not have an embedder element,
     // use window associated with the BC.
     // This happens if we are passed a browsingContext of a chrome window.
@@ -291,11 +291,11 @@ class PromptParent extends JSWindowActor
 
       PromptUtils.propBagToObject(bag, args);
     } finally {
       if (browser) {
         browser.leaveModalState();
         PromptUtils.fireDialogEvent(win, "DOMModalDialogClosed", browser);
       }
     }
-    return args;
+    return Promise.resolve(args);
   }
 }
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -51,17 +51,16 @@ extensions = [
 js_source_path = [
     'browser/components/extensions',
     'browser/components/uitour',
     'testing/marionette',
     'toolkit/components/extensions',
     'toolkit/components/extensions/parent',
     'toolkit/components/featuregates',
     'toolkit/mozapps/extensions',
-    'toolkit/components/prompts/src',
 ]
 root_for_relative_js_paths = '.'
 jsdoc_config_path = 'jsdoc.json'
 
 templates_path = ['_templates']
 source_suffix = '.rst'
 source_suffix = ['.rst', '.md']
 master_doc = 'index'
deleted file mode 100644
--- a/toolkit/components/prompts/docs/index.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-=======
-Prompts
-=======
-
-.. toctree::
-   :maxdepth: 1
-
-   nsIPromptService
-   nsIPromptService-reference
-   modalTypes
\ No newline at end of file
deleted file mode 100644
index 730fe7828c569bbbb550d199c365b4cf0083393b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 66da8ef78246e8d8d65c39ef967ed7d9859372d4..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 505850e8debfff26e0f94abe33dc02a4951f4a11..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/toolkit/components/prompts/docs/modalTypes.rst
+++ /dev/null
@@ -1,95 +0,0 @@
-==================
-Prompt Modal Types
-==================
-
-Window Prompts
---------------
-
-Window prompts are system prompts. They are clearly distinguishable from website
-content and can be opened with or without a parent window.
-While a window prompt is open, the parent window cannot be interacted with.
-That means the user can not close the window or switch tabs.
-Providing a parent window is optional, but highly encouraged. If you do not
-pass a parent the implementation will try to find one or fallback to aborted
-standalone window.
-
-**When to use**: This should be reserved for important browser-wide messages
-with the intent to block any further user interaction until the message has been
-read.
-
-**Flag**: `MODAL_TYPE_WINDOW`
-
-.. caution::
-
-  When using window prompts, make sure they can not be spawned by web content.
-  We've seen `cases <https://bugzilla.mozilla.org/show_bug.cgi?id=1571003>`_
-  of DoS attacks in the wild where websites spammed window prompts to lock up
-  the browser.
-  This prompt type should only be used when necessary and with proper rate
-  limiting. Most of the time, a tab prompt can be be used.
-
-.. figure:: modal-type-window.png
-   :width: 425px
-   :height: 230px
-   :alt: Screenshot of a window prompt.
-
-   Window alert prompt
-
-Tab Prompts
------------
-
-Tab prompts are system prompts like window prompts. As opposed to window
-prompts, they are tab modal and don't steal focus from the parent window.
-Multiple tab prompts cannot be shown at the same time. When opening additional
-prompts, they are FIFO queued.
-
-When the user closes the tab or navigates to a different URI, prompts associated
-with the given tab are closed.
-In this case an exception will be thrown:
-
-.. code-block::
-
-    /*
-    Exception: prompt aborted by user
-    undefined:425
-    */
-
-**When to use**: This prompt should be used for dialogs that were caused by web
-content and thus should be bound to the scope and lifetime of a specific tab,
-but should still look like secure browser UI. Examples are HTTP Auth prompt or
-the dialog to add a new search provider for the current website.
-
-**Flag**: `MODAL_TYPE_TAB`
-
-
-.. figure:: modal-type-tab.png
-   :width: 425px
-   :height: 230px
-   :alt: Screenshot of a tab prompt.
-
-   Tab alert prompt
-
-Content Prompts
----------------
-
-Content prompts are like tab prompts, but they belong to the web content. Thus,
-they are positioned in the center of the selected browser.
-
-**When to use**: The prompt is triggered by or as a result of an action of web
-content and is **not** intended to look like secure browser UI.
-
-**Flag**: `MODAL_TYPE_CONTENT`
-
-.. figure:: modal-type-content.png
-   :width: 425px
-   :height: 230px
-   :alt: Screenshot of a content prompt.
-
-   Content alert prompt
-
-
-Disabling tab/content modal prompts
------------------------------------
-You can disable tab and content modal prompts and get back window-modal prompts
-by setting the `prompts.tab_modal.enabled` preference to `false`.
-This pref might be removed in the future.
\ No newline at end of file
deleted file mode 100644
--- a/toolkit/components/prompts/docs/nsIPromptService-reference.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-========================
-Prompt Service Reference
-========================
-
-This is the JSDoc from the Prompter.jsm implementation. You can find the full
-interface definition in
-`nsIPromptService.idl <https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptService.idl>`_.
-
-.. js:autoclass:: Prompter
-  :members:
deleted file mode 100644
--- a/toolkit/components/prompts/docs/nsIPromptService.rst
+++ /dev/null
@@ -1,195 +0,0 @@
-==============
-Prompt Service
-==============
-
-The `nsIPromptService` provides methods for opening various types of prompts.
-See the `interface documentation <nsIPromptService-reference.html>`_ for a list
-of prompt types.
-Every prompt method has 3 different versions:
-
-- **Prompt by window**:
-  This is considered the legacy way of prompting and only works if the window
-  you want to prompt for is in the same process.
-  Only supports window prompts.
-
-- **Prompt by browsing context (synchronous)**:
-  Use a browsing context as parent for the prompt. Works cross process from
-  parent and content process.
-
-- **Prompt by browsing context (asynchronous)**:
-  Returns a promise which resolves once the prompt closes.
-
-
-The synchronous prompt methods use call by reference (XPCOM `inout` or `out`) to
-return the updated prompt arguments to the caller.
-When prompting async the arguments are passed in by value. Prompt results are
-returned in an `nsIPropertyBag` when the Promise resolves.
-
-
-.. note::
-    If you don't provide a parent window or browsing context the prompt service
-    will fallback to a window prompt.
-    The same goes for browsing contexts of chrome windows, because there is no
-    clear association to a browser / tab.
-
-
-Examples
---------
-
-JavaScript Sync
-~~~~~~~~~~~~~~~
-
-Here is an example of opening a confirm prompt from JavaScript. We are in the
-parent process and we want to show a tab prompt:
-
-.. code-block:: javascript
-
-    // Get the browsing context for the currently selected tab
-    let browsingContext = gBrowser.selectedBrowser.browsingContext;
-
-    // Specify prompt type, can be MODAL_TYPE_TAB, MODAL_TYPE_CONTENT,
-    // MODAL_TYPE_WINDOW
-    let modalType = Services.prompt.MODAL_TYPE_TAB;
-
-    // Object for checkbox state to pass by reference.
-    let check = { value: false };
-
-    // Prompt synchronously and store result
-    let confirmed = Services.prompt.confirmCheckBC(browsingContext, modalType,
-    "My Title", "Hello, World!", "Check this box if you agree", check);
-
-    // check.value now contains final checkbox state
-    // confirmed is a boolean which indicates whether the user pressed ok (true)
-    // or cancel (false)
-    console.debug("User checked checkbox?", check.value);
-    console.debug("User confirmed prompt?", confirmed);
-
-
-JavaScript Async
-~~~~~~~~~~~~~~~~
-
-The same prompt as above, but called async:
-
-.. code-block:: javascript
-
-    // Get the browsing context for the currently selected tab
-    let browsingContext = gBrowser.selectedBrowser.browsingContext;
-
-    // Specify prompt type, can be MODAL_TYPE_TAB, MODAL_TYPE_CONTENT,
-    // MODAL_TYPE_WINDOW
-    let modalType = Services.prompt.MODAL_TYPE_TAB;
-
-    // Note that the checkbox state variable is not an object in this case,
-    because we get the checkbox result via the result object.
-    let check = false;
-
-    // Prompt asynchronously and await result
-    let propBag = await Services.prompt.asyncConfirmCheck(browsingContext,
-                                                          modalType,
-                                                          "My Title",
-                                                          "Hello, World!",
-                                                          "Check this box if you agree",
-                                                          check);
-
-    let ok = propBag.getProperty("ok");
-    let checked = propBag.getProperty("checked");
-
-    // ok is the boolean indicating if the user clicked "ok" (true) or
-    // "cancel" (false).
-    // checked is a boolean indicating the final checkbox state
-    console.debug("User checked checkbox?", checked);
-    console.debug("User confirmed prompt?", ok);
-
-
-C++ Sync
-~~~~~~~~
-
-.. code-block:: c++
-
-      nsCOMPtr<nsIPromptService> promptSvc =
-        do_GetService("@mozilla.org/embedcomp/prompt-service;1");
-
-      if(!promptSvc) {
-        // Error handling
-        return;
-      }
-
-      // Assuming you have the browsing context as a member.
-      // You might need to get the browsing context from somewhere else.
-      BrowsingContext* bc = mBrowsingContext;
-
-      bool ok;
-      bool checked = false;
-
-      nsresult rv = promptSvc->confirmCheck(mBrowsingContext,
-                                            nsIPromptService::MODAL_TYPE_TAB,
-                                            NS_LITERAL_CSTRING("My Title")
-                                            NS_LITERAL_CSTRING("Hello, World!"),
-                                            NS_LITERAL_CSTRING("Check this box if you agree"),
-                                            &checked, &ok);
-
-      // ok is the boolean indicating if the user clicked "ok" (true) or
-      // "cancel" (false).
-      // checked is a boolean indicating the final checkbox state
-
-C++ Async
-~~~~~~~~~
-
-.. code-block:: c++
-
-      nsCOMPtr<nsIPromptService> promptSvc =
-        do_GetService("@mozilla.org/embedcomp/prompt-service;1");
-
-      if(!promptSvc) {
-        // Error handling
-        return;
-      }
-
-      bool checked = false;
-      Promise* promise;
-
-      // Assuming you have the browsing context as a member.
-      // You might need to get the browsing context from somewhere else.
-      BrowsingContext* bc = mBrowsingContext;
-
-      // As opposed to the sync case, here we pass the checked flag by value
-      nsresult rv = promptSvc->confirmCheckAsync(mBrowsingContext,
-                                                 nsIPromptService::MODAL_TYPE_TAB, NS_LITERAL_CSTRING("My Title"),
-                                                 NS_LITERAL_CSTRING("Hello, World!"),
-                                                 NS_LITERAL_CSTRING("Check this box if you agree"),
-                                                 checked, promise);
-
-      // Attach a promise handler
-      RefPtr<PromptHandler> handler = new PromptHandler(promise);
-      promise->AppendNativeHandler(handler);
-
-Then, in your promise handler callback function:
-
-.. code-block:: c++
-
-      void PromptHandler::ResolvedCallback(JSContext* aCx,
-                                       JS::Handle<JS::Value> aValue) {
-        JS::Rooted<JSObject*> detailObj(aCx, &aValue.toObject());
-
-        // Convert the JSObject back to a property bag
-        nsresult rv;
-        nsCOMPtr<nsIPropertyBag2> propBag;
-        rv = UnwrapArg<nsIPropertyBag2>(aCx, detailObj, getter_AddRefs(propBag));
-        if (NS_FAILED(rv)) return;
-
-        bool ok;
-        bool checked;
-        propBag->GetPropertyAsBool(NS_LITERAL_STRING("ok"), &ok);
-        propBag->GetPropertyAsBool(NS_LITERAL_STRING("checked"), &checked);
-
-        // ok is the boolean indicating if the user clicked "ok" (true) or
-        // "cancel" (false).
-        // checked is a boolean indicating the final checkbox state.
-      }
-
-
-
-
-
-For a full list of prompt methods check
-`nsIPromptService reference <nsIPromptService-reference.html>`_.
\ No newline at end of file
--- a/toolkit/components/prompts/moz.build
+++ b/toolkit/components/prompts/moz.build
@@ -5,17 +5,11 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # possibly Notifications and Alerts
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'General')
 
 DIRS += ['src']
 
-SPHINX_TREES['prompts'] = 'docs'
-
-with Files('docs/**'):
-    SCHEDULES.exclusive = ['docs']
-
 MOCHITEST_MANIFESTS += ['test/mochitest.ini']
-MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
 
 JAR_MANIFESTS += ['jar.mn']
--- a/toolkit/components/prompts/src/Prompter.jsm
+++ b/toolkit/components/prompts/src/Prompter.jsm
@@ -3,32 +3,25 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { XPCOMUtils } = ChromeUtils.import(
   "resource://gre/modules/XPCOMUtils.jsm"
 );
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const { objectToPropBag } = ChromeUtils.import(
-  "resource://gre/modules/BrowserUtils.jsm"
-).BrowserUtils;
 // This is redefined below, for strange and unfortunate reasons.
 var { PromptUtils } = ChromeUtils.import(
   "resource://gre/modules/SharedPromptUtils.jsm"
 );
 
 function Prompter() {
   // Note that EmbedPrompter clones this implementation.
 }
 
-/**
- * Implements nsIPromptService and nsIPromptFactory
- * @class Prompter
- */
 Prompter.prototype = {
   classID: Components.ID("{1c978d25-b37f-43a8-a2d6-0c7a239ead87}"),
   QueryInterface: ChromeUtils.generateQI([
     Ci.nsIPromptFactory,
     Ci.nsIPromptService,
   ]),
 
   /* ----------  private members  ---------- */
@@ -57,237 +50,56 @@ Prompter.prototype = {
 
     let p = new ModalPrompter({ domWin });
     p.QueryInterface(iid);
     return p;
   },
 
   /* ----------  nsIPromptService  ---------- */
 
-  /**
-   * Puts up an alert dialog with an OK button.
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   */
   alert(domWin, title, text) {
     let p = this.pickPrompter({ domWin });
     p.alert(title, text);
   },
 
-  /**
-   * Puts up an alert dialog with an OK button.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   */
   alertBC(browsingContext, modalType, ...promptArgs) {
     let p = this.pickPrompter({ browsingContext, modalType });
     p.alert(...promptArgs);
   },
 
-  /**
-   * Puts up an alert dialog with an OK button.
-   *
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @returns {Promise} A promise which resolves when the prompt is dismissed.
-   */
-  asyncAlert(browsingContext, modalType, ...promptArgs) {
-    let p = this.pickPrompter({ browsingContext, modalType, async: true });
-    return p.alert(...promptArgs);
-  },
-
-  /**
-   * Puts up an alert dialog with an OK button and a labeled checkbox.
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   */
   alertCheck(domWin, title, text, checkLabel, checkValue) {
     let p = this.pickPrompter({ domWin });
     p.alertCheck(title, text, checkLabel, checkValue);
   },
 
-  /**
-   * Puts up an alert dialog with an OK button and a labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   */
   alertCheckBC(browsingContext, modalType, ...promptArgs) {
     let p = this.pickPrompter({ browsingContext, modalType });
     p.alertCheck(...promptArgs);
   },
 
-  /**
-   * Puts up an alert dialog with an OK button and a labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   * @param {Boolean} checkValue - The initial checked state of the checkbox.
-   * @returns {Promise<nsIPropertyBag<{ checked: Boolean }>>}
-   *          A promise which resolves when the prompt is dismissed.
-   */
-  asyncAlertCheck(browsingContext, modalType, ...promptArgs) {
-    let p = this.pickPrompter({ browsingContext, modalType, async: true });
-    return p.alertCheck(...promptArgs);
-  },
-
-  /**
-   * Puts up a dialog with OK and Cancel buttons.
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @returns {Boolean} true for OK, false for Cancel.
-   */
   confirm(domWin, title, text) {
     let p = this.pickPrompter({ domWin });
     return p.confirm(title, text);
   },
 
-  /**
-   * Puts up a dialog with OK and Cancel buttons.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @returns {Boolean} true for OK, false for Cancel.
-   */
   confirmBC(browsingContext, modalType, ...promptArgs) {
     let p = this.pickPrompter({ browsingContext, modalType });
     return p.confirm(...promptArgs);
   },
 
-  /**
-   * Puts up a dialog with OK and Cancel buttons.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @returns {Promise<nsIPropertyBag<{ ok: Boolean }>>}
-   *          A promise which resolves when the prompt is dismissed.
-   */
-  asyncConfirm(browsingContext, modalType, ...promptArgs) {
-    let p = this.pickPrompter({ browsingContext, modalType, async: true });
-    return p.confirm(...promptArgs);
-  },
-
-  /**
-   * Puts up a dialog with OK and Cancel buttons and a labeled checkbox.
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   */
   confirmCheck(domWin, title, text, checkLabel, checkValue) {
     let p = this.pickPrompter({ domWin });
     return p.confirmCheck(title, text, checkLabel, checkValue);
   },
 
-  /**
-   * Puts up a dialog with OK and Cancel buttons and a labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   * @returns {Boolean} true for OK, false for Cancel
-   */
   confirmCheckBC(browsingContext, modalType, ...promptArgs) {
     let p = this.pickPrompter({ browsingContext, modalType });
     return p.confirmCheck(...promptArgs);
   },
 
-  /**
-   * Puts up a dialog with OK and Cancel buttons and a labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   * @param {Boolean} checkValue - The initial checked state of the checkbox.
-   * @returns {Promise<nsIPropertyBag<{ ok: Boolean, checked: Boolean }>>}
-   *          A promise which resolves when the prompt is dismissed.
-   */
-  asyncConfirmCheck(browsingContext, modalType, ...promptArgs) {
-    let p = this.pickPrompter({ browsingContext, modalType, async: true });
-    return p.confirmCheck(...promptArgs);
-  },
-
-  /**
-   * Puts up a dialog with up to 3 buttons and an optional, labeled checkbox.
-   *
-   * Buttons are numbered 0 - 2. Button 0 is the default button unless one of
-   * the Button Default Flags is specified.
-   *
-   * A button may use a predefined title, specified by one of the Button Title
-   * Flags values.  Each title value can be multiplied by a position value to
-   * assign the title to a particular button.  If BUTTON_TITLE_IS_STRING is
-   * used for a button, the string parameter for that button will be used.  If
-   * the value for a button position is zero, the button will not be shown.
-   *
-   * In general, flags is constructed per the following example:
-   *
-   * flags = (BUTTON_POS_0) * (BUTTON_TITLE_AAA) +
-   *         (BUTTON_POS_1) * (BUTTON_TITLE_BBB) +
-   *         BUTTON_POS_1_DEFAULT;
-   *
-   * where "AAA" and "BBB" correspond to one of the button titles.
-   *
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {Number} flags - A combination of Button Flags.
-   * @param {String} button0 - Used when button 0 uses TITLE_IS_STRING.
-   * @param {String} button1 - Used when button 1 uses TITLE_IS_STRING.
-   * @param {String} button2 - Used when button 2 uses TITLE_IS_STRING.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        Null if no checkbox.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method
-   *        is called and the final checked state after this method returns.
-   * @returns {Number} The index of the button pressed.
-   */
   confirmEx(
     domWin,
     title,
     text,
     flags,
     button0,
     button1,
     button2,
@@ -302,151 +114,51 @@ Prompter.prototype = {
       button0,
       button1,
       button2,
       checkLabel,
       checkValue
     );
   },
 
-  /**
-   * Puts up a dialog with up to 3 buttons and an optional, labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {Number} flags - A combination of Button Flags.
-   * @param {String} button0 - Used when button 0 uses TITLE_IS_STRING.
-   * @param {String} button1 - Used when button 1 uses TITLE_IS_STRING.
-   * @param {String} button2 - Used when button 2 uses TITLE_IS_STRING.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        Null if no checkbox.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   * @returns {Number} The index of the button pressed.
-   */
-  confirmExBC(browsingContext, modalType, ...promptArgs) {
+  confirmExBC(
+    browsingContext,
+    modalType,
+    title,
+    text,
+    flags,
+    button0,
+    button1,
+    button2,
+    checkLabel,
+    checkValue
+  ) {
     let p = this.pickPrompter({ browsingContext, modalType });
-    return p.confirmEx(...promptArgs);
+    return p.confirmEx(
+      title,
+      text,
+      flags,
+      button0,
+      button1,
+      button2,
+      checkLabel,
+      checkValue
+    );
   },
 
-  /**
-   * Puts up a dialog with up to 3 buttons and an optional, labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {Number} flags - A combination of Button Flags.
-   * @param {String} button0 - Used when button 0 uses TITLE_IS_STRING.
-   * @param {String} button1 - Used when button 1 uses TITLE_IS_STRING.
-   * @param {String} button2 - Used when button 2 uses TITLE_IS_STRING.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        Null if no checkbox.
-   * @param {Boolean} checkValue - The initial checked state of the checkbox.
-   * @returns {Promise<nsIPropertyBag<{ buttonNumClicked: Number, checked: Boolean }>>}
-   */
-  asyncConfirmEx(browsingContext, modalType, ...promptArgs) {
-    let p = this.pickPrompter({ browsingContext, modalType, async: true });
-    return p.confirmEx(...promptArgs);
-  },
-
-  /**
-   * Puts up a dialog with an edit field and an optional, labeled checkbox.
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {Object} value - Contains the default value for the dialog field
-   *        when this method is called (null value is ok).  Upon return, if
-   *        the user pressed OK, then this parameter contains a newly
-   *        allocated string value.
-   *        Otherwise, the parameter's value is unmodified.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   * @returns {Boolean} true for OK, false for Cancel.
-   */
   prompt(domWin, title, text, value, checkLabel, checkValue) {
     let p = this.pickPrompter({ domWin });
     return p.nsIPrompt_prompt(title, text, value, checkLabel, checkValue);
   },
 
-  /**
-   * Puts up a dialog with an edit field and an optional, labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {Object} value - Contains the default value for the dialog field
-   *        when this method is called (null value is ok).  Upon return, if
-   *        the user pressed OK, then this parameter contains a newly
-   *        allocated string value.
-   *        Otherwise, the parameter's value is unmodified.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   * @returns {Boolean} true for OK, false for Cancel.
-   */
   promptBC(browsingContext, modalType, ...promptArgs) {
     let p = this.pickPrompter({ browsingContext, modalType });
     return p.nsIPrompt_prompt(...promptArgs);
   },
 
-  /**
-   * Puts up a dialog with an edit field and an optional, labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String} value - The default value for the dialog text field.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Boolean} checkValue - The initial checked state of the checkbox.
-   * @returns {Promise<nsIPropertyBag<{ ok: Boolean, checked: Boolean, value: String }>>}
-   *          A promise which resolves when the prompt is dismissed.
-   */
-  asyncPrompt(browsingContext, modalType, ...promptArgs) {
-    let p = this.pickPrompter({ browsingContext, modalType, async: true });
-    return p.nsIPrompt_prompt(...promptArgs);
-  },
-
-  /**
-   * Puts up a dialog with an edit field, a password field, and an optional,
-   * labeled checkbox.
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {Object} user - Contains the default value for the username
-   *        field when this method is called (null value is ok).
-   *        Upon return, if the user pressed OK, then this parameter contains
-   *        a newly allocated string value. Otherwise, the parameter's value
-   *        is unmodified.
-   * @param {Object} pass - Contains the default value for the password field
-   *        when this method is called (null value is ok). Upon return, if the
-   *        user pressed OK, this parameter contains a newly allocated string
-   *        value. Otherwise, the parameter's value is unmodified.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   * @returns {Boolean} true for OK, false for Cancel.
-   */
   promptUsernameAndPassword(
     domWin,
     title,
     text,
     user,
     pass,
     checkLabel,
     checkValue
@@ -457,264 +169,57 @@ Prompter.prototype = {
       text,
       user,
       pass,
       checkLabel,
       checkValue
     );
   },
 
-  /**
-   * Puts up a dialog with an edit field, a password field, and an optional,
-   * labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {Object} user - Contains the default value for the username
-   *        field when this method is called (null value is ok).
-   *        Upon return, if the user pressed OK, then this parameter contains
-   *        a newly allocated string value. Otherwise, the parameter's value
-   *        is unmodified.
-   * @param {Object} pass - Contains the default value for the password field
-   *        when this method is called (null value is ok). Upon return, if the
-   *        user pressed OK, this parameter contains a newly allocated string
-   *        value. Otherwise, the parameter's value is unmodified.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   * @returns {Boolean} true for OK, false for Cancel.
-   */
   promptUsernameAndPasswordBC(browsingContext, modalType, ...promptArgs) {
     let p = this.pickPrompter({ browsingContext, modalType });
     return p.nsIPrompt_promptUsernameAndPassword(...promptArgs);
   },
 
-  /**
-   * Puts up a dialog with an edit field, a password field, and an optional,
-   * labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String} user - Default value for the username field.
-   * @param {String} pass - Contains the default value for the password field.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Boolean} checkValue - The initial checked state of the checkbox.
-   * @returns {Promise<nsIPropertyBag<{ ok: Boolean, checked: Boolean, user: String, pass: String }>>}
-   *          A promise which resolves when the prompt is dismissed.
-   */
-  asyncPromptUsernameAndPassword(browsingContext, modalType, ...promptArgs) {
-    let p = this.pickPrompter({ browsingContext, modalType, async: true });
-    return p.nsIPrompt_promptUsernameAndPassword(...promptArgs);
-  },
-
-  /**
-   * Puts up a dialog with a password field and an optional, labeled checkbox.
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {Object} pass - Contains the default value for the password field
-   *        when this method is called (null value is ok). Upon return, if the
-   *        user pressed OK, this parameter contains a newly allocated string
-   *        value. Otherwise, the parameter's value is unmodified.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   * @returns {Boolean} true for OK, false for Cancel.
-   */
   promptPassword(domWin, title, text, pass, checkLabel, checkValue) {
     let p = this.pickPrompter({ domWin });
     return p.nsIPrompt_promptPassword(
       title,
       text,
       pass,
       checkLabel,
       checkValue
     );
   },
 
-  /**
-   * Puts up a dialog with a password field and an optional, labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {Object} pass - Contains the default value for the password field
-   *        when this method is called (null value is ok). Upon return, if the
-   *        user pressed OK, this parameter contains a newly allocated string
-   *        value. Otherwise, the parameter's value is unmodified.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   * @returns {Boolean} true for OK, false for Cancel.
-   */
   promptPasswordBC(browsingContext, modalType, ...promptArgs) {
     let p = this.pickPrompter({ browsingContext, modalType });
     return p.nsIPrompt_promptPassword(...promptArgs);
   },
 
-  /**
-   * Puts up a dialog with a password field and an optional, labeled checkbox.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String} pass - Contains the default value for the password field.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Boolean} checkValue - The initial checked state of the checkbox.
-   * @returns {Promise<nsIPropertyBag<{ ok: Boolean, checked: Boolean, pass: String }>>}
-   *          A promise which resolves when the prompt is dismissed.
-   */
-  asyncPromptPassword(browsingContext, modalType, ...promptArgs) {
-    let p = this.pickPrompter({ browsingContext, modalType, async: true });
-    return p.nsIPrompt_promptPassword(...promptArgs);
-  },
-
-  /**
-   * Puts up a dialog box which has a list box of strings from which the user
-   * may make a single selection.
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String[]} list - The list of strings to display.
-   * @param {Object} selected - Contains the index of the selected item in the
-   *        list when this method returns true.
-   * @returns {Boolean} true for OK, false for Cancel.
-   */
   select(domWin, title, text, list, selected) {
     let p = this.pickPrompter({ domWin });
     return p.select(title, text, list, selected);
   },
 
-  /**
-   * Puts up a dialog box which has a list box of strings from which the user
-   * may make a single selection.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String[]} list - The list of strings to display.
-   * @param {Object} selected - Contains the index of the selected item in the
-   *        list when this method returns true.
-   * @returns {Boolean} true for OK, false for Cancel.
-   */
   selectBC(browsingContext, modalType, ...promptArgs) {
     let p = this.pickPrompter({ browsingContext, modalType });
     return p.select(...promptArgs);
   },
 
-  /**
-   * Puts up a dialog box which has a list box of strings from which the user
-   * may make a single selection.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {String} title - Text to appear in the title of the dialog.
-   * @param {String} text - Text to appear in the body of the dialog.
-   * @param {String[]} list - The list of strings to display.
-   * @returns {Promise<nsIPropertyBag<{ selected: Number, ok: Boolean  }>>}
-   *          A promise which resolves when the prompt is dismissed.
-   */
-  asyncSelect(browsingContext, modalType, ...promptArgs) {
-    let p = this.pickPrompter({ browsingContext, modalType, async: true });
-    return p.select(...promptArgs);
-  },
-
-  /**
-   * Requests a username and a password. Shows a dialog with username and
-   * password field, depending on flags also a domain field.
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {nsIChannel} channel - The channel that requires authentication.
-   * @param {Number} level - Security level of the credential transmission.
-   *        Any of nsIAuthPrompt2.<LEVEL_NONE|LEVEL_PW_ENCRYPTED|LEVEL_SECURE>
-   * @param {nsIAuthInformation} authInfo - Authentication information object.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   * @returns {Boolean}
-   *          true: Authentication can proceed using the values
-   *          in the authInfo object.
-   *          false: Authentication should be cancelled, usually because the
-   *          user did not provide username/password.
-   */
   promptAuth(domWin, channel, level, authInfo, checkLabel, checkValue) {
     let p = this.pickPrompter({ domWin });
     return p.promptAuth(channel, level, authInfo, checkLabel, checkValue);
   },
 
-  /**
-   * Requests a username and a password. Shows a dialog with username and
-   * password field, depending on flags also a domain field.
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {nsIChannel} channel - The channel that requires authentication.
-   * @param {Number} level - Security level of the credential transmission.
-   *        Any of nsIAuthPrompt2.<LEVEL_NONE|LEVEL_PW_ENCRYPTED|LEVEL_SECURE>
-   * @param {nsIAuthInformation} authInfo - Authentication information object.
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after this method returns.
-   * @returns {Boolean}
-   *          true: Authentication can proceed using the values
-   *          in the authInfo object.
-   *          false: Authentication should be cancelled, usually because the
-   *          user did not provide username/password.
-   */
   promptAuthBC(browsingContext, modalType, ...promptArgs) {
     let p = this.pickPrompter({ browsingContext, modalType });
     return p.promptAuth(...promptArgs);
   },
 
-  /**
-   * Asynchronously prompt the user for a username and password.
-   * This has largely the same semantics as promptUsernameAndPassword(),
-   * but returns immediately after calling and returns the entered
-   * data in a callback.
-   *
-   * @param {mozIDOMWindowProxy} domWin - The parent window or null.
-   * @param {nsIChannel} channel - The channel that requires authentication.
-   * @param {nsIAuthPromptCallback} callback - Called once the prompt has been
-   *        closed.
-   * @param {nsISupports} context
-   * @param {Number} level - Security level of the credential transmission.
-   *        Any of nsIAuthPrompt2.<LEVEL_NONE|LEVEL_PW_ENCRYPTED|LEVEL_SECURE>
-   * @param {nsIAuthInformation} authInfo
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after the callback.
-   * @returns {nsICancelable} Interface to cancel prompt.
-   */
   asyncPromptAuth(
     domWin,
     channel,
     callback,
     context,
     level,
     authInfo,
     checkLabel,
@@ -727,40 +232,16 @@ Prompter.prototype = {
       context,
       level,
       authInfo,
       checkLabel,
       checkValue
     );
   },
 
-  /**
-   * Asynchronously prompt the user for a username and password.
-   * This has largely the same semantics as promptUsernameAndPassword(),
-   * but returns immediately after calling and returns the entered
-   * data in a callback.
-   *
-   * @param {BrowsingContext} browsingContext - The browsing context the
-   *        prompt should be opened for.
-   * @param {Number} modalType - The modal type of the prompt.
-   *        nsIPromptService.<MODAL_TYPE_WINDOW|MODAL_TYPE_TAB|MODAL_TYPE_CONTENT>
-   * @param {nsIChannel} channel - The channel that requires authentication.
-   * @param {nsIAuthPromptCallback} callback - Called once the prompt has been
-   *        closed.
-   * @param {nsISupports} context
-   * @param {Number} level - Security level of the credential transmission.
-   *        Any of nsIAuthPrompt2.<LEVEL_NONE|LEVEL_PW_ENCRYPTED|LEVEL_SECURE>
-   * @param {nsIAuthInformation} authInfo
-   * @param {String} checkLabel - Text to appear with the checkbox.
-   *        If null, check box will not be shown.
-   * @param {Object} checkValue - Contains the initial checked state of the
-   *        checkbox when this method is called and the final checked state
-   *        after the callback.
-   * @returns {nsICancelable} Interface to cancel prompt.
-   */
   asyncPromptAuthBC(browsingContext, modalType, ...promptArgs) {
     let p = this.pickPrompter({ browsingContext, modalType });
     return p.asyncPromptAuth(...promptArgs);
   },
 };
 
 // Common utils not specific to a particular prompter style.
 var PromptUtilsTemp = {
@@ -997,22 +478,17 @@ XPCOMUtils.defineLazyGetter(PromptUtils,
       "intl.ellipsis",
       Ci.nsIPrefLocalizedString
     ).data;
   } catch (e) {}
   return ellipsis;
 });
 
 class ModalPrompter {
-  constructor({
-    browsingContext = null,
-    domWin = null,
-    modalType = null,
-    async = false,
-  }) {
+  constructor({ browsingContext = null, domWin = null, modalType = null }) {
     if (browsingContext && domWin) {
       throw new Error("Pass either browsingContext or domWin");
     }
     this.browsingContext = browsingContext;
     this._domWin = domWin;
 
     if (this._domWin) {
       // We have a domWin, get the associated browsing context
@@ -1026,18 +502,16 @@ class ModalPrompter {
           this.browsingContext.embedderElement &&
           this.browsingContext.embedderElement.ownerGlobal;
       }
     }
 
     // Use given modal type or fallback to default
     this.modalType = modalType || ModalPrompter.defaultModalType;
 
-    this.async = async;
-
     this.QueryInterface = ChromeUtils.generateQI([
       Ci.nsIPrompt,
       Ci.nsIAuthPrompt,
       Ci.nsIAuthPrompt2,
       Ci.nsIWritablePropertyBag2,
     ]);
   }
 
@@ -1069,41 +543,21 @@ class ModalPrompter {
   }
 
   get modalType() {
     return this._modalType;
   }
 
   /* ---------- internal methods ---------- */
 
-  /**
-   * Synchronous wrapper around {@link ModalPrompter#openPrompt}
-   * @param {Object} args Prompt arguments. When prompt has been closed, they are updated to reflect the result state.
-   */
-  openPromptSync(args) {
-    let closed = false;
-    this.openPrompt(args)
-      .then(returnedArgs => {
-        if (returnedArgs) {
-          for (let key in returnedArgs) {
-            args[key] = returnedArgs[key];
-          }
-        }
-      })
-      .finally(() => {
-        closed = true;
-      });
-    Services.tm.spinEventLoopUntilOrShutdown(() => closed);
-  }
-
-  async openPrompt(args) {
+  openPrompt(args) {
     if (!this.browsingContext) {
       // We don't have a browsing context, fallback to a window prompt.
       this.openWindowPrompt(null, args);
-      return args;
+      return;
     }
 
     // Select prompts are not part of CommonDialog
     // and thus not supported as tab or content prompts yet. See Bug 1622817.
     // Once they are integrated this override should be removed.
     if (
       args.promptType == "select" &&
       this.modalType !== Ci.nsIPrompt.MODAL_TYPE_WINDOW
@@ -1120,17 +574,17 @@ class ModalPrompter {
 
     let actor;
     try {
       actor = this._domWin.windowGlobalChild.getActor("Prompt");
     } catch (error) {
       Cu.reportError(error);
       // We can't get the prompt actor, fallback to window prompt.
       this.openWindowPrompt(this._domWin, args);
-      return args;
+      return;
     }
 
     let docShell =
       (this.browsingContext && this.browsingContext.docShell) ||
       this._domWin.docShell;
     let inPermitUnload =
       docShell.contentViewer && docShell.contentViewer.inPermitUnload;
     let eventDetail = Cu.cloneInto(
@@ -1161,37 +615,56 @@ class ModalPrompter {
     // differentiate between the different prompts.
     let id =
       "id" +
       Cc["@mozilla.org/uuid-generator;1"]
         .getService(Ci.nsIUUIDGenerator)
         .generateUUID()
         .toString();
 
+    let closed = false;
+
     args.promptPrincipal = this._domWin.document.nodePrincipal;
     args.inPermitUnload = inPermitUnload;
     args._remoteId = id;
 
-    let returnedArgs;
+    actor
+      .sendQuery("Prompt:Open", args)
+      .then(returnedArgs => {
+        // Copy the response from the closed prompt into our args, it will be
+        // read by our caller.
+        if (!returnedArgs) {
+          return;
+        }
+
+        if (returnedArgs.promptAborted) {
+          throw Components.Exception(
+            "prompt aborted by user",
+            Cr.NS_ERROR_NOT_AVAILABLE
+          );
+        }
 
-    try {
-      returnedArgs = await actor.sendQuery("Prompt:Open", args);
-      if (returnedArgs && returnedArgs.promptAborted) {
-        throw Components.Exception(
-          "prompt aborted by user",
-          Cr.NS_ERROR_NOT_AVAILABLE
-        );
-      }
-    } finally {
-      if (windowUtils) {
-        windowUtils.leaveModalState();
-      }
-      PromptUtils.fireDialogEvent(this._domWin, "DOMModalDialogClosed");
+        if (returnedArgs._remoteId !== id) {
+          return;
+        }
+
+        for (let key in returnedArgs) {
+          args[key] = returnedArgs[key];
+        }
+      })
+      .finally(() => {
+        closed = true;
+      });
+
+    Services.tm.spinEventLoopUntilOrShutdown(() => closed);
+
+    if (windowUtils) {
+      windowUtils.leaveModalState();
     }
-    return returnedArgs;
+    PromptUtils.fireDialogEvent(this._domWin, "DOMModalDialogClosed");
   }
 
   /**
    * Open a window modal prompt
    *
    * There's an implied contract that says modal prompts should still work when
    * no "parent" window is passed for the dialog (eg, the "Master Password"
    * dialog does this).  These prompts must be shown even if there are *no*
@@ -1214,41 +687,16 @@ class ModalPrompter {
       uri,
       "_blank",
       "centerscreen,chrome,modal,titlebar",
       propBag
     );
     PromptUtils.propBagToObject(propBag, args);
   }
 
-  /**
-   * Calls async prompt method and optionally runs promise chained task on
-   * result data. Converts result data to nsIPropertyBag.
-   * @param {Object} args - Prompt arguments.
-   * @param {Function} [task] - Function which is called with the modified
-   *  prompt args object once the prompt has been closed. Must return a
-   *  result object for the prompt caller.
-   * @returns {Promise<nsIPropertyBag>} - Resolves with a property bag holding the
-   * prompt result properties. Resolves once prompt has been closed.
-   */
-  async openPromptAsync(args, task) {
-    let result = await this.openPrompt(args);
-    // If task is not defined, the prompt method does not return
-    // anything. In this case we can resolve without value.
-    if (!task) {
-      return undefined;
-    }
-    // Convert task result to nsIPropertyBag and resolve
-    let taskResult = task(result);
-    if (!(taskResult instanceof Object)) {
-      throw new Error("task must return object");
-    }
-    return objectToPropBag(taskResult);
-  }
-
   /*
    * ---------- interface disambiguation ----------
    *
    * nsIPrompt and nsIAuthPrompt share 3 method names with slightly
    * different arguments. All but prompt() have the same number of
    * arguments, so look at the arg types to figure out how we're being
    * called. :-(
    */
@@ -1284,99 +732,76 @@ class ModalPrompter {
     }
 
     let args = {
       promptType: "alert",
       title,
       text,
     };
 
-    if (this.async) {
-      return this.openPromptAsync(args);
-    }
-
-    return this.openPromptSync(args);
+    this.openPrompt(args);
   }
 
   alertCheck(title, text, checkLabel, checkValue) {
     if (!title) {
       title = PromptUtils.getLocalizedString("Alert");
     }
 
-    // For sync calls checkValue is an XPCOM inout. XPCOM wraps primitves in
-    // objects for call by reference.
-    // The async version of this method uses call by value.
-    let checked = this.async ? checkValue : checkValue.value;
-
     let args = {
       promptType: "alertCheck",
       title,
       text,
       checkLabel,
-      checked,
+      checked: checkValue.value,
     };
 
-    if (this.async) {
-      return this.openPromptAsync(args, result => ({
-        checked: result.checked,
-      }));
-    }
+    this.openPrompt(args);
 
-    this.openPromptSync(args);
+    // Checkbox state always returned, even if cancel clicked.
     checkValue.value = args.checked;
-    return undefined;
   }
 
   confirm(title, text) {
     if (!title) {
       title = PromptUtils.getLocalizedString("Confirm");
     }
 
     let args = {
       promptType: "confirm",
       title,
       text,
       ok: false,
     };
 
-    if (this.async) {
-      return this.openPromptAsync(args, result => ({ ok: result.ok }));
-    }
+    this.openPrompt(args);
 
-    this.openPromptSync(args);
+    // Did user click Ok or Cancel?
     return args.ok;
   }
 
   confirmCheck(title, text, checkLabel, checkValue) {
     if (!title) {
       title = PromptUtils.getLocalizedString("ConfirmCheck");
     }
 
-    let checked = this.async ? checkValue : checkValue.value;
-
     let args = {
       promptType: "confirmCheck",
       title,
       text,
       checkLabel,
-      checked,
+      checked: checkValue.value,
       ok: false,
     };
 
-    if (this.async) {
-      return this.openPromptAsync(args, result => ({
-        // Checkbox state always returned, even if cancel clicked.
-        checked: result.checked,
-        // Did user click Ok or Cancel?
-        ok: result.ok,
-      }));
-    }
+    this.openPrompt(args);
 
-    this.openPromptSync(args);
+    // Checkbox state always returned, even if cancel clicked.
     checkValue.value = args.checked;
+
+    // Did user click Ok or Cancel?
     return args.ok;
   }
 
   confirmEx(
     title,
     text,
     flags,
     button0,
@@ -1389,17 +814,17 @@ class ModalPrompter {
       title = PromptUtils.getLocalizedString("Confirm");
     }
 
     let args = {
       promptType: "confirmEx",
       title,
       text,
       checkLabel,
-      checked: this.async ? checkValue : checkValue.value,
+      checked: checkValue.value,
       ok: false,
       buttonNumClicked: 1,
     };
 
     let [
       label0,
       label1,
       label2,
@@ -1415,52 +840,41 @@ class ModalPrompter {
       if (label1) {
         args.button1Label = label1;
         if (label2) {
           args.button2Label = label2;
         }
       }
     }
 
-    if (this.async) {
-      return this.openPromptAsync(args, result => ({
-        checked: !!result.checked,
-        buttonNumClicked: result.buttonNumClicked,
-      }));
-    }
+    this.openPrompt(args);
 
-    this.openPromptSync(args);
+    // Checkbox state always returned, even if cancel clicked.
     checkValue.value = args.checked;
+
+    // Get the number of the button the user clicked.
     return args.buttonNumClicked;
   }
 
   nsIPrompt_prompt(title, text, value, checkLabel, checkValue) {
     if (!title) {
       title = PromptUtils.getLocalizedString("Prompt");
     }
 
     let args = {
       promptType: "prompt",
       title,
       text,
-      value: this.async ? value : value.value,
+      value: value.value,
       checkLabel,
-      checked: this.async ? checkValue : checkValue.value,
+      checked: checkValue.value,
       ok: false,
     };
 
-    if (this.async) {
-      return this.openPromptAsync(args, result => ({
-        checked: !!result.checked,
-        value: result.value,
-        ok: result.ok,
-      }));
-    }
-
-    this.openPromptSync(args);
+    this.openPrompt(args);
 
     // Did user click Ok or Cancel?
     let ok = args.ok;
     if (ok) {
       checkValue.value = args.checked;
       value.value = args.value;
     }
 
@@ -1480,33 +894,24 @@ class ModalPrompter {
         PromptUtils.getBrandFullName(),
       ]);
     }
 
     let args = {
       promptType: "promptUserAndPass",
       title,
       text,
-      user: this.async ? user : user.value,
-      pass: this.async ? pass : pass.value,
+      user: user.value,
+      pass: pass.value,
       checkLabel,
-      checked: this.async ? checkValue : checkValue.value,
+      checked: checkValue.value,
       ok: false,
     };
 
-    if (this.async) {
-      return this.openPromptAsync(args, result => ({
-        checked: result.checked,
-        user: result.user,
-        pass: result.pass,
-        ok: result.ok,
-      }));
-    }
-
-    this.openPromptSync(args);
+    this.openPrompt(args);
 
     // Did user click Ok or Cancel?
     let ok = args.ok;
     if (ok) {
       checkValue.value = args.checked;
       user.value = args.user;
       pass.value = args.pass;
     }
@@ -1520,31 +925,23 @@ class ModalPrompter {
         PromptUtils.getBrandFullName(),
       ]);
     }
 
     let args = {
       promptType: "promptPassword",
       title,
       text,
-      pass: this.async ? pass : pass.value,
+      pass: pass.value,
       checkLabel,
-      checked: this.async ? checkValue : checkValue.value,
+      checked: checkValue.value,
       ok: false,
     };
 
-    if (this.async) {
-      return this.openPromptAsync(args, result => ({
-        checked: result.checked,
-        pass: result.pass,
-        ok: result.ok,
-      }));
-    }
-
-    this.openPromptSync(args);
+    this.openPrompt(args);
 
     // Did user click Ok or Cancel?
     let ok = args.ok;
     if (ok) {
       checkValue.value = args.checked;
       pass.value = args.pass;
     }
 
@@ -1560,24 +957,17 @@ class ModalPrompter {
       promptType: "select",
       title,
       text,
       list,
       selected: -1,
       ok: false,
     };
 
-    if (this.async) {
-      return this.openPromptAsync(args, result => ({
-        selected: result.selected,
-        ok: result.ok,
-      }));
-    }
-
-    this.openPromptSync(args);
+    this.openPrompt(args);
 
     // Did user click Ok or Cancel?
     let ok = args.ok;
     if (ok) {
       selected.value = args.selected;
     }
 
     return ok;
deleted file mode 100644
--- a/toolkit/components/prompts/test/chrome.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[DEFAULT]
-support-files =
-  prompt_common.js
-  chromeScript.js
-
-[test_modal_prompts.html]
-skip-if = toolkit == 'android' || (os == 'linux' && (debug || asan)) #android: TIMED_OUT (For Linux : 950636)
-[test_modal_select.html]
-skip-if = toolkit == 'android' #android: TIMED_OUT
\ No newline at end of file
--- a/toolkit/components/prompts/test/mochitest.ini
+++ b/toolkit/components/prompts/test/mochitest.ini
@@ -8,8 +8,12 @@ support-files =
 
 [test_bug619644.html]
 [test_bug620145.html]
 skip-if = toolkit == 'android' #TIMED_OUT
 [test_subresources_prompts.html]
 skip-if = toolkit == 'android' || verify
 [test_dom_prompts.html]
 skip-if = toolkit == 'android' #android: bug 1267092
+[test_modal_prompts.html]
+skip-if = toolkit == 'android' || (os == 'linux' && (debug || asan)) #android: TIMED_OUT (For Linux : 950636)
+[test_modal_select.html]
+skip-if = toolkit == 'android' #android: TIMED_OUT
--- a/toolkit/components/prompts/test/prompt_common.js
+++ b/toolkit/components/prompts/test/prompt_common.js
@@ -1,159 +1,29 @@
 const { Cc, Ci } = SpecialPowers;
 
-const { propBagToObject } = ChromeUtils.import(
-  "resource://gre/modules/BrowserUtils.jsm"
-).BrowserUtils;
-
 function hasTabModalPrompts() {
   var prefName = "prompts.tab_modal.enabled";
-  const Services = SpecialPowers.Services;
+  var Services = SpecialPowers.Cu.import("resource://gre/modules/Services.jsm")
+    .Services;
   return (
     Services.prefs.getPrefType(prefName) == Services.prefs.PREF_BOOL &&
     Services.prefs.getBoolPref(prefName)
   );
 }
 var isTabModal = hasTabModalPrompts();
 var isSelectDialog = false;
 var isOSX = "nsILocalFileMac" in SpecialPowers.Ci;
 var isE10S = SpecialPowers.Services.appinfo.processType == 2;
 
 var gChromeScript = SpecialPowers.loadChromeScript(
   SimpleTest.getTestFileURL("chromeScript.js")
 );
 SimpleTest.registerCleanupFunction(() => gChromeScript.destroy());
 
-async function runPromptCombinations(window, testFunc) {
-  let util = new PromptTestUtil(window);
-  let run = () => {
-    info(
-      `Running tests (isTabModal=${isTabModal}, usePromptService=${util.usePromptService}, useBrowsingContext=${util.useBrowsingContext}, useAsync=${util.useAsync})`
-    );
-    return testFunc(util);
-  };
-
-  // Prompt service with dom window parent only supports window prompts
-  util.usePromptService = true;
-  util.useBrowsingContext = false;
-  isTabModal = false;
-  util.modalType = Ci.nsIPrompt.MODAL_TYPE_WINDOW;
-  util.useAsync = false;
-  await run();
-
-  let modalTypes = [Ci.nsIPrompt.MODAL_TYPE_WINDOW];
-  // if tab/content prompts are disabled by pref, only test window prompts
-  if (SpecialPowers.getBoolPref("prompts.tab_modal.enabled")) {
-    modalTypes.push(Ci.nsIPrompt.MODAL_TYPE_TAB);
-    modalTypes.push(Ci.nsIPrompt.MODAL_TYPE_CONTENT);
-  }
-
-  for (let type of modalTypes) {
-    util.modalType = type;
-    isTabModal = type !== Ci.nsIPrompt.MODAL_TYPE_WINDOW;
-
-    // Prompt service with browsing context sync
-    util.usePromptService = true;
-    util.useBrowsingContext = true;
-    util.useAsync = false;
-    await run();
-
-    // Prompt service with browsing context async
-    util.usePromptService = true;
-    util.useBrowsingContext = true;
-    util.useAsync = true;
-    await run();
-
-    // nsIPrompt
-    // modalType is set via nsIWritablePropertyBag (legacy)
-    util.usePromptService = false;
-    util.useBrowsingContext = false;
-    util.useAsync = false;
-    await run();
-  }
-}
-
-class PromptTestUtil {
-  constructor(window) {
-    this.window = window;
-    this.browsingContext = SpecialPowers.wrap(
-      window
-    ).windowGlobalChild.browsingContext;
-    this.promptService = SpecialPowers.Services.prompt;
-    this.nsPrompt = Cc["@mozilla.org/prompter;1"]
-      .getService(Ci.nsIPromptFactory)
-      .getPrompt(window, Ci.nsIPrompt);
-
-    this.usePromptService = null;
-    this.useBrowsingContext = null;
-    this.useAsync = null;
-    this.modalType = null;
-  }
-
-  get _prompter() {
-    if (this.usePromptService) {
-      return this.promptService;
-    }
-    return this.nsPrompt;
-  }
-
-  async prompt(funcName, promptArgs) {
-    if (
-      this.useBrowsingContext == null ||
-      this.usePromptService == null ||
-      this.useAsync == null ||
-      this.modalType == null
-    ) {
-      throw new Error("Not initialized");
-    }
-    let args = [];
-    if (this.usePromptService) {
-      if (this.useBrowsingContext) {
-        if (this.useAsync) {
-          funcName = `async${funcName[0].toUpperCase()}${funcName.substring(
-            1
-          )}`;
-        } else {
-          funcName += "BC";
-        }
-        args = [this.browsingContext, this.modalType];
-      } else {
-        args = [this.window];
-      }
-    } else {
-      let bag = this.nsPrompt.QueryInterface(Ci.nsIWritablePropertyBag2);
-      bag.setPropertyAsUint32("modalType", this.modalType);
-    }
-    // Append the prompt arguments
-    args = args.concat(promptArgs);
-
-    let interfaceName = this.usePromptService ? "Services.prompt" : "prompt";
-    ok(
-      this._prompter[funcName],
-      `${interfaceName} should have method ${funcName}.`
-    );
-
-    info(`Calling ${interfaceName}.${funcName}(${args})`);
-    let result = this._prompter[funcName](...args);
-    is(
-      this.useAsync,
-      result != null &&
-        result.constructor != null &&
-        result.constructor.name === "Promise",
-      "If method is async it should return a promise."
-    );
-
-    if (this.useAsync) {
-      let propBag = await result;
-      return propBag && propBagToObject(propBag);
-    }
-    return result;
-  }
-}
-
 function onloadPromiseFor(id) {
   var iframe = document.getElementById(id);
   return new Promise(resolve => {
     iframe.addEventListener(
       "load",
       function(e) {
         resolve(true);
       },
--- a/toolkit/components/prompts/test/test_modal_prompts.html
+++ b/toolkit/components/prompts/test/test_modal_prompts.html
@@ -1,39 +1,77 @@
-
-<!DOCTYPE HTML>
+<!DOCTYPE html>
 <html>
-<head>
-  <title>Modal Prompts Test</title>
-  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="prompt_common.js"></script>
-</head>
-<body>
-Prompter tests: modal prompts
-<p id="display"></p>
+  <head>
+    <title>Modal Prompts Test</title>
+    <script src="/tests/SimpleTest/SimpleTest.js"></script>
+    <script type="text/javascript" src="prompt_common.js"></script>
+    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  </head>
+  <body>
+    Prompter tests: modal prompts
+    <p id="display"></p>
 
-<div id="content" style="display: none">
-  <iframe id="iframe"></iframe>
-</div>
+    <div id="content" style="display: none">
+      <iframe id="iframe"></iframe>
+    </div>
 
-<pre id="test">
+    <pre id="test">
 <script class="testbody" type="text/javascript">
-/* eslint-disable complexity */
-async function runTests(util) {
+async function runTests() {
   const { NetUtil } = SpecialPowers.Cu.import(
     "resource://gre/modules/NetUtil.jsm"
   );
+  const { Services } = SpecialPowers.Cu.import(
+    "resource://gre/modules/Services.jsm"
+  );
+  let state, action, promptDone;
+  ok(
+    true,
+    "Running tests (isTabModal=" +
+      isTabModal +
+      ", usePromptService=" +
+      usePromptService +
+      ", useBrowsingContext=" +
+      useBrowsingContext +
+      ")"
+  );
 
-  let state, action, promptDone;
+  let browsingContext = SpecialPowers.wrap(window).windowGlobalChild
+    .browsingContext;
+
+  let promptArgs;
+
+  let prompter = Cc["@mozilla.org/prompter;1"]
+    .getService(Ci.nsIPromptFactory)
+    .getPrompt(window, Ci.nsIPrompt);
 
   let checkVal = {};
   let textVal = {};
   let passVal = {};
   let flags;
-  let isOK;
+  let isOK, clickedButton;
+
+  function doPrompt(funcName) {
+    let subject;
+    if (usePromptService) {
+      subject = Services.prompt;
+      if (useBrowsingContext) {
+        funcName += "BC";
+        promptArgs.unshift(browsingContext, modalType);
+      } else {
+        promptArgs.unshift(window);
+      }
+    } else {
+      subject = prompter;
+      let bag = prompter.QueryInterface(Ci.nsIWritablePropertyBag2);
+      bag.setPropertyAsUint32("modalType", modalType);
+    }
+    return subject[funcName](...promptArgs);
+  }
 
   // =====
   info("Starting test: Alert");
   state = {
     msg: "This is the alert text.",
     title: "TestTitle",
     iconClass: "alert-icon",
     titleHidden: true,
@@ -49,17 +87,17 @@ async function runTests(util) {
   };
   action = {
     buttonClick: "ok",
   };
 
   promptDone = handlePrompt(state, action);
 
   promptArgs = ["TestTitle", "This is the alert text."];
-  await util.prompt("alert", promptArgs);
+  doPrompt("alert");
 
   await promptDone;
 
   // =====
   info("Starting test: AlertCheck (null checkbox label, so it's hidden)");
   state = {
     msg: "This is the alertCheck text.",
     title: "TestTitle",
@@ -76,23 +114,18 @@ async function runTests(util) {
     defButton: "button0",
   };
   action = {
     buttonClick: "ok",
   };
 
   promptDone = handlePrompt(state, action);
 
-  promptArgs = [
-    "TestTitle",
-    "This is the alertCheck text.",
-    null,
-    util.useAsync ? false : {},
-  ];
-  util.prompt("alertCheck", promptArgs);
+  promptArgs = ["TestTitle", "This is the alertCheck text.", null, {}];
+  doPrompt("alertCheck");
 
   await promptDone;
 
   // =====
   info("Starting test: AlertCheck");
   state = {
     msg: "This is the alertCheck text.",
     title: "TestTitle",
@@ -115,24 +148,20 @@ async function runTests(util) {
 
   promptDone = handlePrompt(state, action);
 
   checkVal.value = false;
   promptArgs = [
     "TestTitle",
     "This is the alertCheck text.",
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  let result = await util.prompt("alertCheck", promptArgs);
-  is(
-    util.useAsync ? result.checked : checkVal.value,
-    true,
-    "checkbox was checked"
-  );
+  doPrompt("alertCheck");
+  is(checkVal.value, true, "checkbox was checked");
 
   await promptDone;
 
   // =====
   info("Starting test: Confirm (ok)");
   state = {
     msg: "This is the confirm text.",
     title: "TestTitle",
@@ -150,18 +179,18 @@ async function runTests(util) {
   };
   action = {
     buttonClick: "ok",
   };
 
   promptDone = handlePrompt(state, action);
 
   promptArgs = ["TestTitle", "This is the confirm text."];
-  result = await util.prompt("confirm", promptArgs);
-  is(util.useAsync ? result.ok : result, true, "checked expected retval");
+  isOK = doPrompt("confirm");
+  is(isOK, true, "checked expected retval");
 
   await promptDone;
 
   // =====
   info("Starting test: Confirm (cancel)");
   state = {
     msg: "This is the confirm text.",
     title: "TestTitle",
@@ -179,18 +208,18 @@ async function runTests(util) {
   };
   action = {
     buttonClick: "cancel",
   };
 
   promptDone = handlePrompt(state, action);
 
   promptArgs = ["TestTitle", "This is the confirm text."];
-  result = await util.prompt("confirm", promptArgs);
-  is(util.useAsync ? result.ok : result, false, "checked expected retval");
+  isOK = doPrompt("confirm");
+  is(isOK, false, "checked expected retval");
 
   await promptDone;
 
   // =====
   info("Starting test: ConfirmCheck (ok, null checkbox label)");
   state = {
     msg: "This is the confirmCheck text.",
     title: "TestTitle",
@@ -207,24 +236,19 @@ async function runTests(util) {
     defButton: "button0",
   };
   action = {
     buttonClick: "ok",
   };
 
   promptDone = handlePrompt(state, action);
 
-  promptArgs = [
-    "TestTitle",
-    "This is the confirmCheck text.",
-    null,
-    util.useAsync ? false : {},
-  ];
-  result = await util.prompt("confirmCheck", promptArgs);
-  is(util.useAsync ? result.ok : result, true, "checked expected retval");
+  promptArgs = ["TestTitle", "This is the confirmCheck text.", null, {}];
+  isOK = doPrompt("confirmCheck");
+  is(isOK, true, "checked expected retval");
 
   await promptDone;
 
   // =====
   info("Starting test: ConfirmCheck (cancel, null checkbox label)");
   state = {
     msg: "This is the confirmCheck text.",
     title: "TestTitle",
@@ -241,24 +265,19 @@ async function runTests(util) {
     defButton: "button0",
   };
   action = {
     buttonClick: "cancel",
   };
 
   promptDone = handlePrompt(state, action);
 
-  promptArgs = [
-    "TestTitle",
-    "This is the confirmCheck text.",
-    null,
-    util.useAsync ? false : {},
-  ];
-  result = await util.prompt("confirmCheck", promptArgs);
-  is(util.useAsync ? result.ok : result, false, "checked expected retval");
+  promptArgs = ["TestTitle", "This is the confirmCheck text.", null, {}];
+  isOK = doPrompt("confirmCheck");
+  is(isOK, false, "checked expected retval");
 
   await promptDone;
 
   // =====
   info("Starting test: ConfirmCheck (ok)");
   state = {
     msg: "This is the confirmCheck text.",
     title: "TestTitle",
@@ -281,25 +300,21 @@ async function runTests(util) {
 
   promptDone = handlePrompt(state, action);
 
   checkVal.value = false;
   promptArgs = [
     "TestTitle",
     "This is the confirmCheck text.",
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("confirmCheck", promptArgs);
-  is(util.useAsync ? result.ok : result, true, "checked expected retval");
-  is(
-    util.useAsync ? result.checked : checkVal.value,
-    true,
-    "expected checkbox setting"
-  );
+  isOK = doPrompt("confirmCheck");
+  is(isOK, true, "checked expected retval");
+  is(checkVal.value, true, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   info("Starting test: ConfirmCheck (cancel)");
   state = {
     msg: "This is the confirmCheck text.",
     title: "TestTitle",
@@ -322,25 +337,21 @@ async function runTests(util) {
 
   promptDone = handlePrompt(state, action);
 
   checkVal.value = false;
   promptArgs = [
     "TestTitle",
     "This is the confirmCheck text.",
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("confirmCheck", promptArgs);
-  is(util.useAsync ? result.ok : result, false, "checked expected retval");
-  is(
-    util.useAsync ? result.checked : checkVal.value,
-    true,
-    "expected checkbox setting"
-  );
+  isOK = doPrompt("confirmCheck");
+  is(isOK, false, "checked expected retval");
+  is(checkVal.value, true, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   info("Starting test: Prompt (ok, no default text)");
   state = {
     msg: "This is the prompt text.",
     title: "TestTitle",
@@ -359,24 +370,20 @@ async function runTests(util) {
   action = {
     buttonClick: "ok",
     textField: "bacon",
   };
 
   promptDone = handlePrompt(state, action);
 
   textVal.value = "";
-  promptArgs = ["TestTitle", "This is the prompt text.", util.useAsync ? textVal.value : textVal , null, util.useAsync ? false : {}];
-  result = await util.prompt("prompt", promptArgs);
-  is(util.useAsync ? result.ok : result, true, "checked expected retval");
-  is(
-    util.useAsync ? result.value : textVal.value,
-    "bacon",
-    "checking expected text value"
-  );
+  promptArgs = ["TestTitle", "This is the prompt text.", textVal, null, {}];
+  isOK = doPrompt("prompt");
+  is(isOK, true, "checked expected retval");
+  is(textVal.value, "bacon", "checking expected text value");
 
   await promptDone;
 
   // =====
   info("Starting test: Prompt (ok, default text)");
   state = {
     msg: "This is the prompt text.",
     title: "TestTitle",
@@ -394,24 +401,20 @@ async function runTests(util) {
   };
   action = {
     buttonClick: "ok",
   };
 
   promptDone = handlePrompt(state, action);
 
   textVal.value = "kittens";
-  promptArgs = ["TestTitle", "This is the prompt text.", util.useAsync ? textVal.value : textVal, null, util.useAsync ? false : {}];
-  result = await util.prompt("prompt", promptArgs);
-  is(util.useAsync ? result.ok : result, true, "checked expected retval");
-  is(
-    util.useAsync ? result.value : textVal.value,
-    "kittens",
-    "checking expected text value"
-  );
+  promptArgs = ["TestTitle", "This is the prompt text.", textVal, null, {}];
+  isOK = doPrompt("prompt");
+  is(isOK, true, "checked expected retval");
+  is(textVal.value, "kittens", "checking expected text value");
 
   await promptDone;
 
   // =====
   info("Starting test: Prompt (cancel, default text)");
   state = {
     msg: "This is the prompt text.",
     title: "TestTitle",
@@ -429,24 +432,20 @@ async function runTests(util) {
   };
   action = {
     buttonClick: "cancel",
   };
 
   promptDone = handlePrompt(state, action);
 
   textVal.value = "puppies";
-  promptArgs = ["TestTitle", "This is the prompt text.", util.useAsync ? textVal.value : textVal, null, util.useAsync ? false : {}];
-  result = await util.prompt("prompt", promptArgs);
-  is(util.useAsync ? result.ok : result, false, "checked expected retval");
-  is(
-    util.useAsync ? result.value : textVal.value,
-    "puppies",
-    "checking expected text value"
-  );
+  promptArgs = ["TestTitle", "This is the prompt text.", textVal, null, {}];
+  isOK = doPrompt("prompt");
+  is(isOK, false, "checked expected retval");
+  is(textVal.value, "puppies", "checking expected text value");
 
   await promptDone;
 
   // =====
   info("Starting test: Prompt (cancel, default text modified)");
   state = {
     msg: "This is the prompt text.",
     title: "TestTitle",
@@ -465,24 +464,20 @@ async function runTests(util) {
   action = {
     buttonClick: "cancel",
     textField: "bacon",
   };
 
   promptDone = handlePrompt(state, action);
 
   textVal.value = "puppies";
-  promptArgs = ["TestTitle", "This is the prompt text.", util.useAsync ? textVal.value : textVal, null, util.useAsync ? false : {}];
-  result = await util.prompt("prompt", promptArgs);
-  is(util.useAsync ? result.ok : result, false, "checked expected retval");
-  is(
-    util.useAsync ? result.value : textVal.value,
-    "puppies",
-    "checking expected text value"
-  );
+  promptArgs = ["TestTitle", "This is the prompt text.", textVal, null, {}];
+  isOK = doPrompt("prompt");
+  is(isOK, false, "checked expected retval");
+  is(textVal.value, "puppies", "checking expected text value");
 
   await promptDone;
 
   // =====
   info("Starting test: Prompt (ok, with checkbox)");
   state = {
     msg: "This is the prompt text.",
     title: "TestTitle",
@@ -505,32 +500,24 @@ async function runTests(util) {
 
   promptDone = handlePrompt(state, action);
 
   textVal.value = "tribbles";
   checkVal.value = false;
   promptArgs = [
     "TestTitle",
     "This is the prompt text.",
-    util.useAsync ? textVal.value : textVal,
+    textVal,
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("prompt", promptArgs);
-  is(util.useAsync ? result.ok : result, true, "checked expected retval");
-  is(
-    util.useAsync ? result.value : textVal.value,
-    "tribbles",
-    "checking expected text value"
-  );
-  is(
-    util.useAsync ? result.checked : checkVal.value,
-    true,
-    "expected checkbox setting"
-  );
+  isOK = doPrompt("prompt");
+  is(isOK, true, "checked expected retval");
+  is(textVal.value, "tribbles", "checking expected text value");
+  is(checkVal.value, true, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   info("Starting test: Prompt (cancel, with checkbox)");
   state = {
     msg: "This is the prompt text.",
     title: "TestTitle",
@@ -545,38 +532,32 @@ async function runTests(util) {
     checked: false,
     focused: "textField",
     defButton: "button0",
   };
   action = {
     buttonClick: "cancel",
     setCheckbox: true,
   };
+
   promptDone = handlePrompt(state, action);
 
   textVal.value = "tribbles";
   checkVal.value = false;
   promptArgs = [
     "TestTitle",
     "This is the prompt text.",
-    util.useAsync ? textVal.value : textVal,
+    textVal,
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("prompt", promptArgs);
-  is(util.useAsync ? result.ok : result, false, "checked expected retval");
-  is(
-    util.useAsync ? result.value : textVal.value,
-    "tribbles",
-    "checking expected text value"
-  );
-  ok(
-    util.useAsync ? result.checked : !checkVal.value,
-    "expected checkbox setting"
-  );
+  isOK = doPrompt("prompt");
+  is(isOK, false, "checked expected retval");
+  is(textVal.value, "tribbles", "checking expected text value");
+  is(checkVal.value, false, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   // Just two tests for this, since password manager already tests this extensively.
   info("Starting test: PromptUsernameAndPassword (ok)");
   state = {
     msg: "This is the pUAP text.",
@@ -603,38 +584,26 @@ async function runTests(util) {
   promptDone = handlePrompt(state, action);
 
   textVal.value = "usr";
   passVal.value = "ssh";
   checkVal.value = false;
   promptArgs = [
     "TestTitle",
     "This is the pUAP text.",
-    util.useAsync ? textVal.value : textVal,
-    util.useAsync ? passVal.value : passVal,
+    textVal,
+    passVal,
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("promptUsernameAndPassword", promptArgs);
-  is(util.useAsync ? result.ok : result, true, "checked expected retval");
-  is(
-    util.useAsync ? result.user : textVal.value,
-    "newusr",
-    "checking expected text value"
-  );
-  is(
-    util.useAsync ? result.pass : passVal.value,
-    "newssh",
-    "checking expected pass value"
-  );
-  is(
-    util.useAsync ? result.checked : checkVal.value,
-    true,
-    "expected checkbox setting"
-  );
+  isOK = doPrompt("promptUsernameAndPassword");
+  is(isOK, true, "checked expected retval");
+  is(textVal.value, "newusr", "checking expected text value");
+  is(passVal.value, "newssh", "checking expected pass value");
+  is(checkVal.value, true, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   info("Starting test: PromptUsernameAndPassword (cancel)");
   state = {
     msg: "This is the pUAP text.",
     title: "TestTitle",
@@ -660,35 +629,26 @@ async function runTests(util) {
   promptDone = handlePrompt(state, action);
 
   textVal.value = "usr";
   passVal.value = "ssh";
   checkVal.value = false;
   promptArgs = [
     "TestTitle",
     "This is the pUAP text.",
-    util.useAsync ? textVal.value : textVal,
-    util.useAsync ? passVal.value : passVal,
+    textVal,
+    passVal,
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("promptUsernameAndPassword", promptArgs);
-  is(util.useAsync ? result.ok : result, false, "checked expected retval");
-  ok(
-    (util.useAsync && result.user == "newusr") || textVal.value == "usr",
-    "checking expected text value"
-  );
-  ok(
-    (util.useAsync && result.pass == "newpass") || passVal.value == "ssh",
-    "checking expected pass value"
-  );
-  ok(
-    util.useAsync ? result.checked : !checkVal.value,
-    "expected checkbox setting"
-  );
+  isOK = doPrompt("promptUsernameAndPassword");
+  is(isOK, false, "checked expected retval");
+  is(textVal.value, "usr", "checking expected text value");
+  is(passVal.value, "ssh", "checking expected pass value");
+  is(checkVal.value, false, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   info("Starting test: PromptPassword (ok)");
   state = {
     msg: "This is the promptPassword text.",
     title: "TestTitle",
@@ -712,32 +672,24 @@ async function runTests(util) {
 
   promptDone = handlePrompt(state, action);
 
   passVal.value = "ssh";
   checkVal.value = false;
   promptArgs = [
     "TestTitle",
     "This is the promptPassword text.",
-    util.useAsync ? passVal.value : passVal,
+    passVal,
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("promptPassword", promptArgs);
-  is(util.useAsync ? result.ok : result, true, "checked expected retval");
-  is(
-    util.useAsync ? result.pass : passVal.value,
-    "newssh",
-    "checking expected pass value"
-  );
-  is(
-    util.useAsync ? result.checked : checkVal.value,
-    true,
-    "expected checkbox setting"
-  );
+  isOK = doPrompt("promptPassword");
+  is(isOK, true, "checked expected retval");
+  is(passVal.value, "newssh", "checking expected pass value");
+  is(checkVal.value, true, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   info("Starting test: PromptPassword (cancel)");
   state = {
     msg: "This is the promptPassword text.",
     title: "TestTitle",
@@ -761,30 +713,24 @@ async function runTests(util) {
 
   promptDone = handlePrompt(state, action);
 
   passVal.value = "ssh";
   checkVal.value = false;
   promptArgs = [
     "TestTitle",
     "This is the promptPassword text.",
-    util.useAsync ? passVal.value : passVal,
+    passVal,
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("promptPassword", promptArgs);
-  is(util.useAsync ? result.ok : result, false, "checked expected retval");
-  ok(
-    (util.useAsync && result.pass == "newssh") || passVal.value == "ssh",
-    "checking expected pass value"
-  );
-  ok(
-    util.useAsync ? result.checked : !checkVal.value,
-    "expected checkbox setting"
-  );
+  isOK = doPrompt("promptPassword");
+  is(isOK, false, "checked expected retval");
+  is(passVal.value, "ssh", "checking expected pass value");
+  is(checkVal.value, false, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   info("Starting test: ConfirmEx (ok/cancel, ok)");
   state = {
     msg: "This is the confirmEx text.",
     title: "TestTitle",
@@ -812,24 +758,20 @@ async function runTests(util) {
   promptArgs = [
     "TestTitle",
     "This is the confirmEx text.",
     flags,
     null,
     null,
     null,
     null,
-    util.useAsync ? false : {},
+    {},
   ];
-  result = await util.prompt("confirmEx", promptArgs);
-  is(
-    util.useAsync ? result.buttonNumClicked : result,
-    0,
-    "checked expected button num click"
-  );
+  clickedButton = doPrompt("confirmEx");
+  is(clickedButton, 0, "checked expected button num click");
 
   await promptDone;
 
   // =====
   info("Starting test: ConfirmEx (yes/no, cancel)");
   state = {
     msg: "This is the confirmEx text.",
     title: "TestTitle",
@@ -857,24 +799,20 @@ async function runTests(util) {
   promptArgs = [
     "TestTitle",
     "This is the confirmEx text.",
     flags,
     null,
     null,
     null,
     null,
-    util.useAsync ? false : {},
+    {},
   ];
-  result = await util.prompt("confirmEx", promptArgs);
-  is(
-    util.useAsync ? result.buttonNumClicked : result,
-    1,
-    "checked expected button num click"
-  );
+  clickedButton = doPrompt("confirmEx");
+  is(clickedButton, 1, "checked expected button num click");
 
   await promptDone;
 
   // =====
   info("Starting test: ConfirmEx (buttons from args, checkbox, ok)");
   state = {
     msg: "This is the confirmEx text.",
     title: "TestTitle",
@@ -909,29 +847,21 @@ async function runTests(util) {
   promptArgs = [
     "TestTitle",
     "This is the confirmEx text.",
     flags,
     "butt0",
     "butt1",
     "butt2",
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("confirmEx", promptArgs);
-  is(
-    util.useAsync ? result.buttonNumClicked : result,
-    0,
-    "checked expected button num click"
-  );
-  is(
-    util.useAsync ? result.checked : checkVal.value,
-    true,
-    "expected checkbox setting"
-  );
+  clickedButton = doPrompt("confirmEx");
+  is(clickedButton, 0, "checked expected button num click");
+  is(checkVal.value, true, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   info("Starting test: ConfirmEx (buttons from args, checkbox, cancel)");
   state = {
     msg: "This is the confirmEx text.",
     title: "TestTitle",
@@ -967,29 +897,21 @@ async function runTests(util) {
   promptArgs = [
     "TestTitle",
     "This is the confirmEx text.",
     flags,
     "butt0",
     "butt1",
     "butt2",
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("confirmEx", promptArgs);
-  is(
-    util.useAsync ? result.buttonNumClicked : result,
-    1,
-    "checked expected button num click"
-  );
-  is(
-    util.useAsync ? result.checked : checkVal.value,
-    true,
-    "expected checkbox setting"
-  );
+  clickedButton = doPrompt("confirmEx");
+  is(clickedButton, 1, "checked expected button num click");
+  is(checkVal.value, true, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   info("Starting test: ConfirmEx (buttons from args, checkbox, button3)");
   state = {
     msg: "This is the confirmEx text.",
     title: "TestTitle",
@@ -1025,29 +947,21 @@ async function runTests(util) {
   promptArgs = [
     "TestTitle",
     "This is the confirmEx text.",
     flags,
     "butt0",
     "butt1",
     "butt2",
     "Check me out!",
-    util.useAsync ? checkVal.value : checkVal,
+    checkVal,
   ];
-  result = await util.prompt("confirmEx", promptArgs);
-  is(
-    util.useAsync ? result.buttonNumClicked : result,
-    2,
-    "checked expected button num click"
-  );
-  is(
-    util.useAsync ? result.checked : checkVal.value,
-    true,
-    "expected checkbox setting"
-  );
+  clickedButton = doPrompt("confirmEx");
+  is(clickedButton, 2, "checked expected button num click");
+  is(checkVal.value, true, "expected checkbox setting");
 
   await promptDone;
 
   // =====
   // (skipped for E10S and tabmodal tests: window is required)
   info("Starting test: Alert, no window");
   state = {
     msg: "This is the alert text.",
@@ -1066,17 +980,17 @@ async function runTests(util) {
   };
   action = {
     buttonClick: "ok",
   };
   if (!isTabModal && !isE10S) {
     promptDone = handlePrompt(state, action);
 
     promptArgs = ["TestTitle", "This is the alert text."];
-    await util.prompt("alert", promptArgs);
+    doPrompt("alert");
 
     await promptDone;
   }
 
   // =====
   // (skipped for tabmodal tests: delay not supported)
   info("Starting test: ConfirmEx (delay, ok)");
   state = {
@@ -1114,24 +1028,20 @@ async function runTests(util) {
     promptArgs = [
       "TestTitle",
       "This is the confirmEx delay text.",
       flags,
       null,
       null,
       null,
       null,
-      util.useAsync ? false : {},
+      {},
     ];
-    result = await util.prompt("confirmEx", promptArgs);
-    is(
-      util.useAsync ? result.buttonNumClicked : result,
-      0,
-      "checked expected button num click"
-    );
+    clickedButton = doPrompt("confirmEx");
+    is(clickedButton, 0, "checked expected button num click");
 
     await promptDone;
   }
 
   // promptAuth already tested via password manager but do a few specific things here.
   var channel = NetUtil.newChannel({
     uri: "http://example.com",
     loadUsingSystemPrincipal: true,
@@ -1166,22 +1076,22 @@ async function runTests(util) {
     defButton: "button0",
   };
   action = {
     buttonClick: "ok",
     setCheckbox: true,
     textField: "username",
     passField: "password",
   };
-  if (util.usePromptService && !util.useAsync) {
+  if (usePromptService) {
     promptDone = handlePrompt(state, action);
 
     checkVal.value = false;
     promptArgs = [channel, level, authinfo, "Check me out!", checkVal];
-    isOK = await util.prompt("promptAuth", promptArgs);
+    isOK = doPrompt("promptAuth");
     is(isOK, true, "checked expected retval");
     is(authinfo.username, "username", "checking filled username");
     is(authinfo.password, "password", "checking filled password");
     is(checkVal.value, true, "expected checkbox setting");
 
     await promptDone;
   }
 
@@ -1208,27 +1118,27 @@ async function runTests(util) {
     defButton: "button0",
   };
   action = {
     buttonClick: "ok",
     setCheckbox: true,
     textField: "username",
     passField: "password",
   };
-  if (util.usePromptService && !util.useAsync) {
+  if (usePromptService) {
     promptDone = handlePrompt(state, action);
 
     checkVal.value = false;
     var longString = "";
     for (var i = 0; i < 20; i++) longString += "abcdefghi "; // 200 chars long
     authinfo.realm = longString;
     authinfo.username = "";
     authinfo.password = "";
     promptArgs = [channel, level, authinfo, "Check me out!", checkVal];
-    isOK = await util.prompt("promptAuth", promptArgs);
+    isOK = doPrompt("promptAuth");
     is(isOK, true, "checked expected retval");
     is(authinfo.username, "username", "checking filled username");
     is(authinfo.password, "password", "checking filled password");
     is(checkVal.value, true, "expected checkbox setting");
 
     await promptDone;
   }
 
@@ -1261,21 +1171,21 @@ async function runTests(util) {
     defButton: "button0",
   };
   action = {
     buttonClick: "ok",
     setCheckbox: false,
     textField: "username",
     passField: "password",
   };
-  if (util.usePromptService && !util.useAsync) {
+  if (usePromptService) {
     promptDone = handlePrompt(state, action);
     checkVal.value = false;
     promptArgs = [channel, level, authinfo, "Check me out!", checkVal];
-    isOK = await util.prompt("promptAuth", promptArgs);
+    isOK = doPrompt("promptAuth");
     is(isOK, true, "checked expected retval");
     is(authinfo.username, "username", "checking filled username");
     is(authinfo.password, "password", "checking filled password");
     is(checkVal.value, false, "expected checkbox setting");
 
     await promptDone;
   }
 
@@ -1308,32 +1218,64 @@ async function runTests(util) {
     defButton: "button0",
   };
   action = {
     buttonClick: "ok",
     setCheckbox: false,
     textField: "username",
     passField: "password",
   };
-  if (util.usePromptService && !util.useAsync) {
+  if (usePromptService) {
     promptDone = handlePrompt(state, action);
 
     checkVal.value = false;
     promptArgs = [channel, level, authinfo, "Check me out!", checkVal];
-    isOK = await util.prompt("promptAuth", promptArgs);
+    isOK = doPrompt("promptAuth");
     is(isOK, true, "checked expected retval");
     is(authinfo.username, "username", "checking filled username");
     is(authinfo.password, "password", "checking filled password");
     is(checkVal.value, false, "expected checkbox setting");
 
     await promptDone;
   }
 }
 
-let promptArgs;
+let usePromptService;
+let useBrowsingContext;
+let modalType;
 
 add_task(async function runPromptTests() {
-  await runPromptCombinations(window, runTests);
+  info("Process type: " + SpecialPowers.Services.appinfo.processType);
+
+  // Prompt service with dom window parent only supports window prompts
+  usePromptService = true;
+  useBrowsingContext = false;
+  isTabModal = false;
+  modalType = Ci.nsIPrompt.MODAL_TYPE_WINDOW;
+  await runTests();
+
+  let modalTypes = [Ci.nsIPrompt.MODAL_TYPE_WINDOW];
+  // if tab/content prompts are disabled by pref, only test window prompts
+  if (SpecialPowers.getBoolPref("prompts.tab_modal.enabled")) {
+    modalTypes.push(Ci.nsIPrompt.MODAL_TYPE_TAB);
+    modalTypes.push(Ci.nsIPrompt.MODAL_TYPE_CONTENT);
+  }
+
+  for (let type of modalTypes) {
+    modalType = type;
+    isTabModal = type !== Ci.nsIPrompt.MODAL_TYPE_WINDOW;
+
+    // Prompt service with browsing context
+    usePromptService = true;
+    useBrowsingContext = true;
+    await runTests();
+
+    // nsIPrompt
+    // modalType is set via nsIWritablePropertyBag (legacy)
+    usePromptService = false;
+    useBrowsingContext = false;
+    await runTests();
+  }
 });
 </script>
 </pre>
-</body>
+  </body>
 </html>
--- a/toolkit/components/prompts/test/test_modal_select.html
+++ b/toolkit/components/prompts/test/test_modal_select.html
@@ -1,14 +1,15 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <title>Modal Prompts Test</title>
-  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <script src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="text/javascript" src="prompt_common.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 Prompter tests: modal prompts
 <p id="display"></p>
 
 <div id="content" style="display: none">
   <iframe id="iframe"></iframe>
 </div>
@@ -44,97 +45,98 @@ function handlePrompt(state, action) {
       gChromeScript.removeMessageListener("promptHandled", handled);
       checkPromptState(msg.promptState, state);
       resolve(true);
     });
     gChromeScript.sendAsyncMessage("handlePrompt", { action, isSelect: true});
   });
 }
 
-async function runTests(util) {
-    // Select prompt does not support tab or content prompts yet. See Bug 1622817.
-    if(util.modalType != Ci.nsIPrompt.MODAL_TYPE_WINDOW) {
-        info('Skipping modal type for select prompt...');
-        return;
-    }
 
-    // Empty list
+// =====
+add_task(async function test_select_empty_list() {
     info("Starting test: Select (0 items, ok)");
     let state = {
         msg: "This is the select text.",
         title: "TestTitle",
         items: [],
     };
     let action = {
         buttonClick: "ok",
     };
     let promptDone = handlePrompt(state, action);
     let items = [];
     selectVal.value = null; // outparam, just making sure.
-    let result =  await util.prompt("select", ["TestTitle", "This is the select text.", items, util.useAsync ? false : selectVal]);
-    is(util.useAsync ? result.ok : result, true, "checked expected retval");
-    is(util.useAsync ? result.selected : selectVal.value, -1, "checking selected index");
+    isOK = Services.prompt.select(window, "TestTitle", "This is the select text.", items, selectVal);
+    is(isOK, true, "checked expected retval");
+    is(selectVal.value, -1, "checking selected index");
+
     await promptDone;
+});
 
-    // ok
+// =====
+add_task(async function test_select_ok() {
     info("Starting test: Select (3 items, ok)");
-    state = {
-        msg: "This is the select text.",
-        title: "TestTitle",
-        items: ["one", "two", "three"],
-    };
-    action = {
-        buttonClick: "ok",
-    };
-    promptDone = handlePrompt(state, action);
-    items = ["one", "two", "three"];
-    selectVal.value = null; // outparam, just making sure.
-    result = await util.prompt("select", ["TestTitle", "This is the select text.", items, util.useAsync ? false : selectVal]);
-    is(util.useAsync ? result.ok : result, true, "checked expected retval");
-    is(util.useAsync ? result.selected : selectVal.value, 0, "checking selected index");
-    await promptDone;
-
-    // select item
-    info("Starting test: Select (3 items, selection changed, ok)");
-    state = {
+    let state = {
         msg: "This is the select text.",
         title: "TestTitle",
         items: ["one", "two", "three"],
     };
-    action = {
+    let action = {
         buttonClick: "ok",
-        selectItem: 1,
     };
-    promptDone = handlePrompt(state, action);
-    items = ["one", "two", "three"];
+    let promptDone = handlePrompt(state, action);
+    let items = ["one", "two", "three"];
     selectVal.value = null; // outparam, just making sure.
-    result = await util.prompt("select", ["TestTitle", "This is the select text.", items,  util.useAsync ? false : selectVal]);
-    is(util.useAsync ? result.ok : result, true, "checked expected retval");
-    is(util.useAsync ? result.selected : selectVal.value, 1, "checking selected index");
+    isOK = Services.prompt.select(window, "TestTitle", "This is the select text.", items, selectVal);
+    is(isOK, true, "checked expected retval");
+    is(selectVal.value, 0, "checking selected index");
+
     await promptDone;
+});
 
-    // cancel prompt
-    info("Starting test: Select (3 items, cancel)");
-    state = {
+// =====
+add_task(async function test_select_item() {
+    info("Starting test: Select (3 items, selection changed, ok)");
+    let state = {
         msg: "This is the select text.",
         title: "TestTitle",
         items: ["one", "two", "three"],
     };
-    action = {
+    let action = {
+        buttonClick: "ok",
+        selectItem: 1,
+    };
+    let promptDone = handlePrompt(state, action);
+    let items = ["one", "two", "three"];
+    selectVal.value = null; // outparam, just making sure.
+    isOK = Services.prompt.select(window, "TestTitle", "This is the select text.", items, selectVal);
+    is(isOK, true, "checked expected retval");
+    is(selectVal.value, 1, "checking selected index");
+
+    await promptDone;
+});
+
+// =====
+add_task(async function test_cancel_prompt() {
+    info("Starting test: Select (3 items, cancel)");
+    let state = {
+        msg: "This is the select text.",
+        title: "TestTitle",
+        items: ["one", "two", "three"],
+    };
+    let action = {
         buttonClick: "cancel",
     };
-    promptDone = handlePrompt(state, action);
-    items = ["one", "two", "three"];
+    let promptDone = handlePrompt(state, action);
+    let items = ["one", "two", "three"];
     selectVal.value = null; // outparam, just making sure.
-    result = await util.prompt("select", ["TestTitle", "This is the select text.", items,  util.useAsync ? false : selectVal]);
-    is(util.useAsync ? result.ok : result, false, "checked expected retval");
-    ok(util.useAsync && result.selected == -1 || selectVal.value == 0, "checking selected index");
+    isOK = Services.prompt.select(window, "TestTitle", "This is the select text.", items, selectVal);
+    is(isOK, false, "checked expected retval");
+    is(selectVal.value, 0, "checking selected index");
+
     await promptDone;
-}
-
-add_task(async function runPromptTests() {
-    await runPromptCombinations(window, runTests);
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/toolkit/components/windowwatcher/nsIPromptService.idl
+++ b/toolkit/components/windowwatcher/nsIPromptService.idl
@@ -54,37 +54,20 @@ interface nsIPromptService : nsISupports
    * @param aDialogTitle
    *        Text to appear in the title of the dialog.
    * @param aText
    *        Text to appear in the body of the dialog.
    */
   void alert(in mozIDOMWindowProxy aParent,
              in wstring aDialogTitle,
              in wstring aText);
-  /**
-   * Like alert, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   void alertBC(in BrowsingContext aBrowsingContext,
                in unsigned long modalType,
                in wstring aDialogTitle,
                in wstring aText);
-  /**
-   * Async version of alertBC
-   *
-   * @return A promise which resolves when the prompt is dismissed.
-   */
-  Promise asyncAlert(in BrowsingContext aBrowsingContext,
-              in unsigned long modalType,
-              in wstring aDialogTitle,
-              in wstring aText);
 
   /**
    * Puts up an alert dialog with an OK button and a labeled checkbox.
    *
    * @param aParent
    *        The parent window or null.
    * @param aDialogTitle
    *        Text to appear in the title of the dialog.
@@ -96,82 +79,42 @@ interface nsIPromptService : nsISupports
    *        Contains the initial checked state of the checkbox when this method
    *        is called and the final checked state after this method returns.
    */
   void alertCheck(in mozIDOMWindowProxy aParent,
                   in wstring aDialogTitle,
                   in wstring aText,
                   in wstring aCheckMsg,
                   inout boolean aCheckState);
-  /**
-   * Like alertCheck, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   void alertCheckBC(in BrowsingContext aBrowsingContext,
                     in unsigned long modalType,
                     in wstring aDialogTitle,
                     in wstring aText,
                     in wstring aCheckMsg,
                     inout boolean aCheckState);
-  /**
-   * Async version of alertCheckBC
-   *
-   * @return A promise which resolves when the prompt is dismissed.
-   *
-   * @resolves nsIPropertyBag { checked: boolean }
-   */
-  Promise asyncAlertCheck(in BrowsingContext aBrowsingContext,
-                          in unsigned long modalType,
-                          in wstring aDialogTitle,
-                          in wstring aText,
-                          in wstring aCheckMsg,
-                          in boolean aCheckState);
 
   /**
    * Puts up a dialog with OK and Cancel buttons.
    *
    * @param aParent
    *        The parent window or null.
    * @param aDialogTitle
    *        Text to appear in the title of the dialog.
    * @param aText
    *        Text to appear in the body of the dialog.
    *
    * @return true for OK, false for Cancel
    */
   boolean confirm(in mozIDOMWindowProxy aParent,
                   in wstring aDialogTitle,
                   in wstring aText);
-  /**
-   * Like confirm, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   boolean confirmBC(in BrowsingContext aBrowsingContext,
                     in unsigned long modalType,
                     in wstring aDialogTitle,
                     in wstring aText);
-  /**
-   * Async version of confirmBC
-   *
-   * @return A promise which resolves when the prompt is dismissed.
-   *
-   * @resolves nsIPropertyBag { ok: boolean }
-   */
-  Promise asyncConfirm(in BrowsingContext aBrowsingContext,
-                       in unsigned long modalType,
-                       in wstring aDialogTitle,
-                       in wstring aText);
 
   /**
    * Puts up a dialog with OK and Cancel buttons and a labeled checkbox.
    *
    * @param aParent
    *        The parent window or null.
    * @param aDialogTitle
    *        Text to appear in the title of the dialog.
@@ -185,43 +128,22 @@ interface nsIPromptService : nsISupports
    *
    * @return true for OK, false for Cancel
    */
   boolean confirmCheck(in mozIDOMWindowProxy aParent,
                        in wstring aDialogTitle,
                        in wstring aText,
                        in wstring aCheckMsg,
                        inout boolean aCheckState);
-  /**
-   * Like confirmCheck, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   boolean confirmCheckBC(in BrowsingContext aBrowsingContext,
                          in unsigned long modalType,
                          in wstring aDialogTitle,
                          in wstring aText,
                          in wstring aCheckMsg,
                          inout boolean aCheckState);
-  /**
-   * Async version of confirmCheckBC
-   *
-   * @return A promise which resolves when the prompt is dismissed.
-   *
-   * @resolves nsIPropertyBag { ok: boolean, checked: boolean }
-   */
-  Promise asyncConfirmCheck(in BrowsingContext aBrowsingContext,
-                            in unsigned long modalType,
-                            in wstring aDialogTitle,
-                            in wstring aText,
-                            in wstring aCheckMsg,
-                            in boolean aCheckState);
 
   /**
    * Button Flags
    *
    * The following flags are combined to form the aButtonFlags parameter passed
    * to confirmEx.  See confirmEx for more information on how the flags may be
    * combined.
    */
@@ -325,51 +247,27 @@ interface nsIPromptService : nsISupports
                     in wstring aDialogTitle,
                     in wstring aText,
                     in unsigned long aButtonFlags,
                     in wstring aButton0Title,
                     in wstring aButton1Title,
                     in wstring aButton2Title,
                     in wstring aCheckMsg,
                     inout boolean aCheckState);
-  /**
-   * Like confirmEx, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   int32_t confirmExBC(in BrowsingContext aBrowsingContext,
                       in unsigned long modalType,
                       in wstring aDialogTitle,
                       in wstring aText,
                       in unsigned long aButtonFlags,
                       in wstring aButton0Title,
                       in wstring aButton1Title,
                       in wstring aButton2Title,
                       in wstring aCheckMsg,
                       inout boolean aCheckState);
-  /**
-   * Async version of confirmExBC
-   *
-   * @return A promise which resolves when the prompt is dismissed.
-   *
-   * @resolves nsIPropertyBag { checked: boolean, buttonNumClicked: int }
-   */
-  Promise asyncConfirmEx(in BrowsingContext aBrowsingContext,
-                      in unsigned long modalType,
-                      in wstring aDialogTitle,
-                      in wstring aText,
-                      in unsigned long aButtonFlags,
-                      in wstring aButton0Title,
-                      in wstring aButton1Title,
-                      in wstring aButton2Title,
-                      in wstring aCheckMsg,
-                      in boolean aCheckState);
+
   /**
    * Puts up a dialog with an edit field and an optional, labeled checkbox.
    *
    * @param aParent
    *        The parent window or null.
    * @param aDialogTitle
    *        Text to appear in the title of the dialog.
    * @param aText
@@ -388,45 +286,23 @@ interface nsIPromptService : nsISupports
    * @return true for OK, false for Cancel.
    */
   boolean prompt(in mozIDOMWindowProxy aParent,
                  in wstring aDialogTitle,
                  in wstring aText,
                  inout wstring aValue,
                  in wstring aCheckMsg,
                  inout boolean aCheckState);
-  /**
-   * Like prompt, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   boolean promptBC(in BrowsingContext aBrowsingContext,
                    in unsigned long modalType,
                    in wstring aDialogTitle,
                    in wstring aText,
                    inout wstring aValue,
                    in wstring aCheckMsg,
                    inout boolean aCheckState);
-  /**
-   * Async version of promptBC
-   *
-   * @return A promise which resolves when the prompt is dismissed.
-   *
-   * @resolves nsIPropertyBag { checked: boolean, value: string, ok: boolean }
-   */
-  Promise asyncPrompt(in BrowsingContext aBrowsingContext,
-                   in unsigned long modalType,
-                   in wstring aDialogTitle,
-                   in wstring aText,
-                   in wstring aValue,
-                   in wstring aCheckMsg,
-                   in boolean aCheckState);
 
   /**
    * Puts up a dialog with an edit field, a password field, and an optional,
    * labeled checkbox.
    *
    * @param aParent
    *        The parent window or null.
    * @param aDialogTitle
@@ -453,47 +329,24 @@ interface nsIPromptService : nsISupports
    */
   boolean promptUsernameAndPassword(in mozIDOMWindowProxy aParent,
                                     in wstring aDialogTitle,
                                     in wstring aText,
                                     inout wstring aUsername,
                                     inout wstring aPassword,
                                     in wstring aCheckMsg,
                                     inout boolean aCheckState);
-  /**
-   * Like promptUsernameAndPassword, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   boolean promptUsernameAndPasswordBC(in BrowsingContext aBrowsingContext,
                                       in unsigned long modalType,
                                       in wstring aDialogTitle,
                                       in wstring aText,
                                       inout wstring aUsername,
                                       inout wstring aPassword,
                                       in wstring aCheckMsg,
                                       inout boolean aCheckState);
-  /**
-   * Async version of promptUsernameAndPasswordBC
-   *
-   * @return A promise which resolves when the prompt is dismissed.
-   *
-   * @resolves nsIPropertyBag { checked: boolean, user: string, pass: string, ok: boolean }
-   */
-  Promise asyncPromptUsernameAndPassword(in BrowsingContext aBrowsingContext,
-                                      in unsigned long modalType,
-                                      in wstring aDialogTitle,
-                                      in wstring aText,
-                                      in wstring aUsername,
-                                      in wstring aPassword,
-                                      in wstring aCheckMsg,
-                                      in boolean aCheckState);
 
   /**
    * Puts up a dialog with a password field and an optional, labeled checkbox.
    *
    * @param aParent
    *        The parent window or null.
    * @param aDialogTitle
    *        Text to appear in the title of the dialog.
@@ -513,45 +366,24 @@ interface nsIPromptService : nsISupports
    * @return true for OK, false for Cancel.
    */
   boolean promptPassword(in mozIDOMWindowProxy aParent,
                          in wstring aDialogTitle,
                          in wstring aText,
                          inout wstring aPassword,
                          in wstring aCheckMsg,
                          inout boolean aCheckState);
-  /**
-   * Like promptPassword, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   boolean promptPasswordBC(in BrowsingContext aBrowsingContext,
                            in unsigned long modalType,
                            in wstring aDialogTitle,
                            in wstring aText,
                            inout wstring aPassword,
                            in wstring aCheckMsg,
                            inout boolean aCheckState);
-  /**
-   * Async version of promptPasswordBC
-   *
-   * @return A promise which resolves when the prompt is dismissed.
-   *
-   * @resolves nsIPropertyBag { checked: boolean, pass: string, ok: boolean }
-   */
-  Promise asyncPromptPassword(in BrowsingContext aBrowsingContext,
-                           in unsigned long modalType,
-                           in wstring aDialogTitle,
-                           in wstring aText,
-                           in wstring aPassword,
-                           in wstring aCheckMsg,
-                           in boolean aCheckState);
+
   /**
    * Puts up a dialog box which has a list box of strings from which the user
    * may make a single selection.
    *
    * @param aParent
    *        The parent window or null.
    * @param aDialogTitle
    *        Text to appear in the title of the dialog.
@@ -565,88 +397,53 @@ interface nsIPromptService : nsISupports
    *
    * @return true for OK, false for Cancel.
    */
   boolean select(in mozIDOMWindowProxy aParent,
                  in wstring aDialogTitle,
                  in wstring aText,
                  in Array<AString> aSelectList,
                  out long aOutSelection);
-  /**
-   * Like select, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   boolean selectBC(in BrowsingContext aBrowsingContext,
                    in unsigned long modalType,
                    in wstring aDialogTitle,
                    in wstring aText,
                    in Array<AString> aSelectList,
                    out long aOutSelection);
-  /**
-   * Async version of selectBC
-   *
-   * @return A promise which resolves when the prompt is dismissed.
-   *
-   * @resolves nsIPropertyBag { selected: int, ok: boolean }
-   */
-  Promise asyncSelect(in BrowsingContext aBrowsingContext,
-                   in unsigned long modalType,
-                   in wstring aDialogTitle,
-                   in wstring aText,
-                   in Array<AString> aSelectList);
 
   // NOTE: These functions differ from their nsIAuthPrompt counterparts by
   // having additional checkbox parameters
   // checkValue can be null meaning to show no checkbox
   // checkboxLabel is a wstring so that it can be null from both JS and C++ in
   // a convenient way
   //
   // See nsIAuthPrompt2 for documentation on the semantics of the other
   // parameters.
   boolean promptAuth(in mozIDOMWindowProxy aParent,
                      in nsIChannel aChannel,
                      in uint32_t level,
                      in nsIAuthInformation authInfo,
                      in wstring checkboxLabel,
                      inout boolean checkValue);
-  /**
-   * Like promptAuth, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   boolean promptAuthBC(in BrowsingContext aBrowsingContext,
                        in unsigned long modalType,
                        in nsIChannel aChannel,
                        in uint32_t level,
                        in nsIAuthInformation authInfo,
                        in wstring checkboxLabel,
                        inout boolean checkValue);
+
   nsICancelable asyncPromptAuth(in mozIDOMWindowProxy aParent,
                                 in nsIChannel aChannel,
                                 in nsIAuthPromptCallback aCallback,
                                 in nsISupports aContext,
                                 in uint32_t level,
                                 in nsIAuthInformation authInfo,
                                 in wstring checkboxLabel,
                                 inout boolean checkValue);
-  /**
-   * Like asyncPromptAuth, but with a BrowsingContext as parent.
-   *
-   * @param aBrowsingContext
-   *        The browsing context the prompt should be opened for.
-   * @param modalType
-   *        Whether the prompt should be window, tab or content modal.
-   */
   nsICancelable asyncPromptAuthBC(in BrowsingContext aBrowsingContext,
                                   in unsigned long modalType,
                                   in nsIChannel aChannel,
                                   in nsIAuthPromptCallback aCallback,
                                   in nsISupports aContext,
                                   in uint32_t level,
                                   in nsIAuthInformation authInfo,
                                   in wstring checkboxLabel,
--- a/toolkit/docs/index.rst
+++ b/toolkit/docs/index.rst
@@ -8,16 +8,15 @@ This is the nascent documentation of the
    :maxdepth: 1
 
    mozapps/extensions/addon-manager/index
    components/crashes/crash-manager/index
    crashreporter/crashreporter/index
    components/featuregates/featuregates/index
    search/index
    components/normandy/normandy/index
-   components/prompts/prompts/index
    modules/subprocess/toolkit_modules/subprocess/index
    components/telemetry/index
    components/glean/index
    modules/toolkit_modules/index
    content/toolkit_widgets/index
    components/url-classifier/url-classifier/index
    components/extensions/webextensions/index
--- a/toolkit/modules/BrowserUtils.jsm
+++ b/toolkit/modules/BrowserUtils.jsm
@@ -883,71 +883,9 @@ var BrowserUtils = {
     }
 
     const count = CanonicalBrowsingContext.countSiteOrigins(topLevelBC);
 
     Services.telemetry
       .getHistogramById("FX_NUMBER_OF_UNIQUE_SITE_ORIGINS_ALL_TABS")
       .add(count);
   },
-
-  /**
-   * Converts a property bag to object.
-   * @param {nsIPropertyBag} bag - The property bag to convert
-   * @returns {Object} - The object representation of the nsIPropertyBag
-   */
-  propBagToObject(bag) {
-    function toValue(property) {
-      if (typeof property != "object") {
-        return property;
-      }
-      if (Array.isArray(property)) {
-        return property.map(this.toValue, this);
-      }
-      if (property && property instanceof Ci.nsIPropertyBag) {
-        return this.propBagToObject(property);
-      }
-      return property;
-    }
-    if (!(bag instanceof Ci.nsIPropertyBag)) {
-      throw new TypeError("Not a property bag");
-    }
-    let result = {};
-    for (let { name, value: property } of bag.enumerator) {
-      let value = toValue(property);
-      result[name] = value;
-    }
-    return result;
-  },
-
-  /**
-   * Converts an object to a property bag.
-   * @param {Object} obj - The object to convert.
-   * @returns {nsIPropertyBag} - The property bag representation of the object.
-   */
-  objectToPropBag(obj) {
-    function fromValue(value) {
-      if (typeof value == "function") {
-        return null; // Emulating the behavior of JSON.stringify with functions
-      }
-      if (Array.isArray(value)) {
-        return value.map(this.fromValue, this);
-      }
-      if (value == null || typeof value != "object") {
-        // Auto-converted to nsIVariant
-        return value;
-      }
-      return this.objectToPropBag(value);
-    }
-
-    if (obj == null || typeof obj != "object") {
-      throw new TypeError("Invalid object: " + obj);
-    }
-    let bag = Cc["@mozilla.org/hash-property-bag;1"].createInstance(
-      Ci.nsIWritablePropertyBag
-    );
-    for (let k of Object.keys(obj)) {
-      let value = fromValue(obj[k]);
-      bag.setProperty(k, value);
-    }
-    return bag;
-  },
 };