tor-browser

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

worker.js (719B)


      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 import { clearASTs } from "./utils/ast";
      6 import getScopes, { clearScopes } from "./getScopes";
      7 import { setSource, clearSources } from "./sources";
      8 import mapExpression from "./mapExpression";
      9 
     10 import { workerHandler } from "../../../../shared/worker-utils";
     11 
     12 function clearAllHelpersForSources(sourceIds) {
     13  clearASTs(sourceIds);
     14  clearScopes(sourceIds);
     15  clearSources(sourceIds);
     16 }
     17 
     18 self.onmessage = workerHandler({
     19  getScopes,
     20  clearSources: clearAllHelpersForSources,
     21  mapExpression,
     22  setSource,
     23 });