forked from mirrors/gecko-dev
Bug 1817729 - [devtools] Ensure computing Actor's requestTypes only once. r=jdescottes
This complex object used to be computed only once per Class, but this regressed to be computed once per Class instance. Differential Revision: https://phabricator.services.mozilla.com/D170412
This commit is contained in:
parent
200dca5cfb
commit
1715c2ffcb
1 changed files with 5 additions and 1 deletions
|
|
@ -34,7 +34,11 @@ class Actor extends Pool {
|
||||||
// Will contain the actor's ID
|
// Will contain the actor's ID
|
||||||
this.actorID = null;
|
this.actorID = null;
|
||||||
|
|
||||||
this.requestTypes = generateRequestTypes(spec);
|
// Ensure computing requestTypes only one time per class
|
||||||
|
const proto = Object.getPrototypeOf(this);
|
||||||
|
if (!proto.requestTypes) {
|
||||||
|
proto.requestTypes = generateRequestTypes(spec);
|
||||||
|
}
|
||||||
|
|
||||||
// Forward events to the connection.
|
// Forward events to the connection.
|
||||||
if (spec.events) {
|
if (spec.events) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue