Bug 1942239 - Add option to explicitly enable incremental origin initialization in...
[gecko.git] / toolkit / components / backgroundtasks / dbg-actors.js
blob2fb3b45914c6fd906742a70d0c99adddee9a388c
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 file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /* globals require, exports */
7 "use strict";
9 const { DevToolsServer } = require("devtools/server/devtools-server");
10 const { RootActor } = require("devtools/server/actors/root");
11 const { BrowserTabList } = require("devtools/server/actors/webbrowser");
12 const { ProcessActorList } = require("devtools/server/actors/process");
13 const {
14 ActorRegistry,
15 } = require("devtools/server/actors/utils/actor-registry");
17 /**
18 * background-task specific actors.
22 /**
23 * Construct a root actor appropriate for use in a server running a background task.
25 function createRootActor(connection) {
26 let parameters = {
27 tabList: new BackgroundTaskTabList(connection),
28 processList: new ProcessActorList(),
29 globalActorFactories: ActorRegistry.globalActorFactories,
30 onShutdown() {},
32 return new RootActor(connection, parameters);
34 exports.createRootActor = createRootActor;
36 /**
37 * A "stub" TabList implementation that provides no tabs.
39 class BackgroundTaskTabList extends BrowserTabList {
40 getList() {
41 return Promise.resolve([]);