mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1717724 - [devtools] Remove web console actor traits. r=nchevobbe,devtools-backward-compat-reviewers
This depends on calling startListening, which forces target to be attached asynchronously. Also, we would like to stop calling startListening as it has been replaced by watchResources APIs. If we ever need a trait, we should rather use RootActor one, as it is easy to read by any code. Or we should come up with something more robut and more generic that this startListening setup. Depends on D118584 Differential Revision: https://phabricator.services.mozilla.com/D118585
This commit is contained in:
parent
876f60dacd
commit
716014661a
@ -24,7 +24,6 @@ class WebConsoleFront extends FrontClassWithSpec(webconsoleSpec) {
|
||||
constructor(client, targetFront, parentFront) {
|
||||
super(client, targetFront, parentFront);
|
||||
this._client = client;
|
||||
this.traits = {};
|
||||
this.events = [];
|
||||
|
||||
// Attribute name from which to retrieve the actorID out of the target actor's form
|
||||
@ -306,7 +305,6 @@ class WebConsoleFront extends FrontClassWithSpec(webconsoleSpec) {
|
||||
async startListeners(listeners) {
|
||||
const response = await super.startListeners(listeners);
|
||||
this.hasNativeConsoleAPI = response.nativeConsoleAPI;
|
||||
this.traits = response.traits;
|
||||
return response;
|
||||
}
|
||||
|
||||
|
@ -198,8 +198,6 @@ const WebConsoleActor = ActorClassWithSpec(webconsoleSpec, {
|
||||
"last-pb-context-exited"
|
||||
);
|
||||
}
|
||||
|
||||
this.traits = {};
|
||||
},
|
||||
/**
|
||||
* Debugger instance.
|
||||
@ -236,12 +234,6 @@ const WebConsoleActor = ActorClassWithSpec(webconsoleSpec, {
|
||||
*/
|
||||
conn: null,
|
||||
|
||||
/**
|
||||
* List of supported features by the console actor.
|
||||
* @type object
|
||||
*/
|
||||
traits: null,
|
||||
|
||||
/**
|
||||
* The global we work with (this can be a Window, a Worker global or even a Sandbox
|
||||
* for processes and addons).
|
||||
@ -791,7 +783,6 @@ const WebConsoleActor = ActorClassWithSpec(webconsoleSpec, {
|
||||
return {
|
||||
startedListeners: startedListeners,
|
||||
nativeConsoleAPI: this.hasNativeConsoleAPI(this.global),
|
||||
traits: this.traits,
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -12,12 +12,9 @@ const {
|
||||
Arg,
|
||||
} = require("devtools/shared/protocol");
|
||||
|
||||
types.addDictType("console.traits", {});
|
||||
|
||||
types.addDictType("console.startlisteners", {
|
||||
startedListeners: "array:string",
|
||||
nativeConsoleAPI: "nullable:boolean",
|
||||
traits: "console.traits",
|
||||
});
|
||||
|
||||
types.addDictType("console.stoplisteners", {
|
||||
|
Loading…
Reference in New Issue
Block a user