tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

run.js (1050B)


      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/. */
      4 
      5 "use strict";
      6 
      7 /* globals AboutCompatBroker, AVAILABLE_SHIMS, CUSTOM_FUNCTIONS,
      8           listenForRemoteSettingsUpdates,
      9           Interventions, Shims */
     10 
     11 var interventions, shims;
     12 
     13 const AVAILABLE_INTERVENTIONS =
     14 #include data/interventions.json
     15 
     16 try {
     17  interventions = new Interventions(AVAILABLE_INTERVENTIONS, CUSTOM_FUNCTIONS);
     18  interventions.bootup();
     19 } catch (e) {
     20  console.error("Interventions failed to start", e);
     21  interventions = undefined;
     22 }
     23 
     24 try {
     25  shims = new Shims(AVAILABLE_SHIMS);
     26 } catch (e) {
     27  console.error("Shims failed to start", e);
     28  shims = undefined;
     29 }
     30 
     31 try {
     32  const aboutCompatBroker = new AboutCompatBroker({
     33    interventions,
     34    shims,
     35  });
     36  aboutCompatBroker.bootup();
     37 } catch (e) {
     38  console.error("about:compat broker failed to start", e);
     39 }
     40 
     41 listenForRemoteSettingsUpdates(interventions, shims);