Bug 1685680 [wpt PR 27099] - Add missing jsapi tests for wasm reference-types proposa...
[gecko.git] / browser / actors / AboutNewInstallChild.jsm
blobfe1a9bc24695ecdd851372283916d52ff1d92fab
1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 var EXPORTED_SYMBOLS = ["AboutNewInstallChild"];
8 const { RemotePageChild } = ChromeUtils.import(
9   "resource://gre/actors/RemotePageChild.jsm"
12 ChromeUtils.defineModuleGetter(
13   this,
14   "UpdateUtils",
15   "resource://gre/modules/UpdateUtils.jsm"
18 class AboutNewInstallChild extends RemotePageChild {
19   actorCreated() {
20     super.actorCreated();
22     this.exportFunctions(["RPMGetUpdateChannel", "RPMGetFxAccountsEndpoint"]);
23   }
25   RPMGetUpdateChannel() {
26     return UpdateUtils.UpdateChannel;
27   }
29   RPMGetFxAccountsEndpoint(aEntrypoint) {
30     return this.wrapPromise(
31       new Promise(resolve => {
32         this.sendQuery("FxAccountsEndpoint", { entrypoint: aEntrypoint }).then(
33           result => {
34             resolve(Cu.cloneInto(result, this.contentWindow));
35           }
36         );
37       })
38     );
39   }