tor-browser

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

Utils.js (532B)


      1 /**
      2 * Any copyright is dedicated to the Public Domain.
      3 * http://creativecommons.org/publicdomain/zero/1.0/
      4 */
      5 
      6 let UtilsChild;
      7 
      8 async function ensureUtilsChild() {
      9  if (UtilsChild) {
     10    return;
     11  }
     12 
     13  const { UtilsChild: importedUtilsChild } = await import(
     14    "/tests/dom/quota/test/modules/worker/UtilsChild.mjs"
     15  );
     16 
     17  UtilsChild = importedUtilsChild;
     18 }
     19 
     20 const Utils = {
     21  async getCachedOriginUsage() {
     22    await ensureUtilsChild();
     23 
     24    const result = await UtilsChild.getCachedOriginUsage();
     25    return result;
     26  },
     27 };