Backed out changeset 0a227ecdcca5 (bug 1580485) for debugger failure on a CLOSED TREE

This commit is contained in:
Coroiu Cristina 2019-09-12 21:20:32 +03:00
Родитель a6c404619f
Коммит b7a3c598ec
1 изменённых файлов: 5 добавлений и 30 удалений

Просмотреть файл

@ -7,34 +7,9 @@
import { workerUtils } from "devtools-utils";
const { WorkerDispatcher } = workerUtils;
let startArgs;
let dispatcher;
const dispatcher = new WorkerDispatcher();
export const start = dispatcher.start.bind(dispatcher);
export const stop = dispatcher.stop.bind(dispatcher);
function getDispatcher() {
if (!dispatcher) {
dispatcher = new WorkerDispatcher();
dispatcher.start(...startArgs);
}
return dispatcher;
}
export const start = (...args) => {
startArgs = args;
};
export const stop = () => {
if (dispatcher) {
dispatcher.stop();
dispatcher = null;
startArgs = null;
}
};
export const getMatches = (...args) => {
return getDispatcher().invoke("getMatches", ...args);
};
export const findSourceMatches = (...args) => {
return getDispatcher().invoke("findSourceMatches", ...args);
};
export const getMatches = dispatcher.task("getMatches");
export const findSourceMatches = dispatcher.task("findSourceMatches");