2017-09-28 18:29:55 +03:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set of protocol messages that affect thread state, and the
|
|
|
|
* state the actor is in after each message.
|
|
|
|
*/
|
|
|
|
const ThreadStateTypes = {
|
2019-04-29 20:52:58 +03:00
|
|
|
paused: "paused",
|
|
|
|
resumed: "attached",
|
|
|
|
detached: "detached",
|
|
|
|
running: "attached",
|
2017-09-28 18:29:55 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set of protocol messages that are sent by the server without a prior request
|
|
|
|
* by the client.
|
|
|
|
*/
|
|
|
|
const UnsolicitedNotifications = {
|
2019-04-29 20:52:58 +03:00
|
|
|
networkEventUpdate: "networkEventUpdate",
|
|
|
|
tabDetached: "tabDetached",
|
|
|
|
tabListChanged: "tabListChanged",
|
|
|
|
addonListChanged: "addonListChanged",
|
|
|
|
workerListChanged: "workerListChanged",
|
|
|
|
serviceWorkerRegistrationListChanged: "serviceWorkerRegistrationList",
|
2018-10-15 11:36:07 +03:00
|
|
|
|
|
|
|
// newSource is still emitted on the ThreadActor, in addition to the
|
2019-07-11 12:45:32 +03:00
|
|
|
// BrowsingContextActor we have to keep it here until ThreadFront is converted to
|
2018-10-15 11:36:07 +03:00
|
|
|
// ThreadFront and/or we stop emitting this duplicated events.
|
|
|
|
// See ThreadActor.onNewSourceEvent.
|
2019-04-29 20:52:58 +03:00
|
|
|
newSource: "newSource",
|
2017-09-28 18:29:55 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set of pause types that are sent by the server and not as an immediate
|
|
|
|
* response to a client request.
|
|
|
|
*/
|
|
|
|
const UnsolicitedPauses = {
|
2019-04-29 20:52:58 +03:00
|
|
|
resumeLimit: "resumeLimit",
|
|
|
|
debuggerStatement: "debuggerStatement",
|
|
|
|
breakpoint: "breakpoint",
|
|
|
|
DOMEvent: "DOMEvent",
|
|
|
|
watchpoint: "watchpoint",
|
2019-06-20 01:27:57 +03:00
|
|
|
eventBreakpoint: "eventBreakpoint",
|
2019-04-29 20:52:58 +03:00
|
|
|
exception: "exception",
|
|
|
|
replayForcedPause: "replayForcedPause",
|
2019-06-26 09:23:03 +03:00
|
|
|
mutationBreakpoint: "mutationBreakpoint",
|
2017-09-28 18:29:55 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
ThreadStateTypes,
|
|
|
|
UnsolicitedNotifications,
|
|
|
|
UnsolicitedPauses,
|
|
|
|
};
|