Backed out 7 changesets (bug 1839993) for causing build bustages on DecoderTemplate...
[gecko.git] / browser / extensions / webcompat / run.js
blob5822dbb2ca3096408398446f1138112747190356
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 "use strict";
7 /* globals AboutCompatBroker, AVAILABLE_INJECTIONS, AVAILABLE_SHIMS,
8            AVAILABLE_PIP_OVERRIDES, AVAILABLE_UA_OVERRIDES, CUSTOM_FUNCTIONS,
9            Injections, Shims, UAOverrides */
11 let injections, shims, uaOverrides;
13 try {
14   injections = new Injections(AVAILABLE_INJECTIONS, CUSTOM_FUNCTIONS);
15   injections.bootup();
16 } catch (e) {
17   console.error("Injections failed to start", e);
18   injections = undefined;
21 try {
22   uaOverrides = new UAOverrides(AVAILABLE_UA_OVERRIDES);
23   uaOverrides.bootup();
24 } catch (e) {
25   console.error("UA overrides failed to start", e);
26   uaOverrides = undefined;
29 try {
30   shims = new Shims(AVAILABLE_SHIMS);
31 } catch (e) {
32   console.error("Shims failed to start", e);
33   shims = undefined;
36 try {
37   const aboutCompatBroker = new AboutCompatBroker({
38     injections,
39     shims,
40     uaOverrides,
41   });
42   aboutCompatBroker.bootup();
43 } catch (e) {
44   console.error("about:compat broker failed to start", e);