index.js (809B)
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 "use strict"; 6 7 const { 8 WorkerDispatcher, 9 } = require("resource://devtools/client/shared/worker-utils.js"); 10 11 const SEARCH_WORKER_URL = 12 "resource://devtools/client/netmonitor/src/workers/search/worker.js"; 13 14 class SearchDispatcher extends WorkerDispatcher { 15 constructor() { 16 super(SEARCH_WORKER_URL); 17 } 18 19 // The search worker support just one task at this point, 20 // which is searching through specified resource. 21 searchInResource = this.task("searchInResource"); 22 } 23 24 // Compared to debugger, we instantiate a singleton within the dispatcher module 25 module.exports = new SearchDispatcher();