Exemplo n.º 1
0
export function bootstrapWorkers() {
  if (!isFirefoxPanel()) {
    // When used in Firefox, the toolbox manages the source map worker.
    startSourceMapWorker(getValue("workers.sourceMapURL"));
  }
  startPrettyPrintWorker(getValue("workers.prettyPrintURL"));
  startParserWorker(getValue("workers.parserURL"));
  startSearchWorker(getValue("workers.searchURL"));
}
Exemplo n.º 2
0
beforeAll(() => {
  startSourceMapWorker(
    path.join(rootPath, "node_modules/devtools-source-map/src/worker.js"),
    ""
  );
  startPrettyPrintWorker(
    path.join(rootPath, "src/workers/pretty-print/worker.js")
  );
  startParserWorker(path.join(rootPath, "src/workers/parser/worker.js"));
  startSearchWorker(path.join(rootPath, "src/workers/search/worker.js"));
  process.on("unhandledRejection", formatException);
});
Exemplo n.º 3
0
export function bootstrapWorkers() {
  const workerPath = isDevelopment()
    ? "assets/build"
    : "resource://devtools/client/debugger/new/dist";

  if (isDevelopment()) {
    // When used in Firefox, the toolbox manages the source map worker.
    startSourceMapWorker(`${workerPath}/source-map-worker.js`);
  }

  prettyPrint.start(`${workerPath}/pretty-print-worker.js`);
  parser.start(`${workerPath}/parser-worker.js`);
  search.start(`${workerPath}/search-worker.js`);
  return { prettyPrint, parser, search };
}
Exemplo n.º 4
0
export function bootstrapWorkers(panelWorkers: Workers) {
  const workerPath = isDevelopment()
    ? "assets/build"
    : "resource://devtools/client/debugger/dist";

  if (isDevelopment()) {
    // When used in Firefox, the toolbox manages the source map worker.
    startSourceMapWorker(
      `${workerPath}/source-map-worker.js`,
      // This is relative to the worker itself.
      "./source-map-worker-assets/"
    );
  }

  prettyPrint.start(`${workerPath}/pretty-print-worker.js`);
  parser = new ParserDispatcher();

  parser.start(`${workerPath}/parser-worker.js`);
  search.start(`${workerPath}/search-worker.js`);
  return { ...panelWorkers, prettyPrint, parser, search };
}