diff --git a/src/utils/parser/index.js b/src/utils/parser/index.js index 6b7ee98bbf..d835cfbe6a 100644 --- a/src/utils/parser/index.js +++ b/src/utils/parser/index.js @@ -1,11 +1,11 @@ // @flow import { workerUtils } from "devtools-utils"; -import { getClosestExpression } from "./utils/closest"; const { WorkerDispatcher } = workerUtils; const dispatcher = new WorkerDispatcher(); +const getClosestExpression = dispatcher.task("getClosestExpression"); const getSymbols = dispatcher.task("getSymbols"); const getVariablesInScope = dispatcher.task("getVariablesInScope"); const getOutOfScopeLocations = dispatcher.task("getOutOfScopeLocations"); diff --git a/src/utils/parser/worker.js b/src/utils/parser/worker.js index 9bb4997852..374ba3c196 100644 --- a/src/utils/parser/worker.js +++ b/src/utils/parser/worker.js @@ -1,3 +1,4 @@ +import { getClosestExpression } from "./utils/closest"; import { getVariablesInScope } from "./scopes"; import getSymbols from "./getSymbols"; import getOutOfScopeLocations from "./getOutOfScopeLocations"; @@ -6,6 +7,7 @@ import { workerUtils } from "devtools-utils"; const { workerHandler } = workerUtils; self.onmessage = workerHandler({ + getClosestExpression, getOutOfScopeLocations, getSymbols, getVariablesInScope