зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1334293 - Use the typeName for source and thread actors. r=ochameau
MozReview-Commit-ID: IpreKTT0hrt --HG-- extra : rebase_source : 5f429b0c93dc18a59603d99d5485a4afbb8063d6
This commit is contained in:
Родитель
534f8bfa90
Коммит
46f3ae9842
|
@ -235,9 +235,9 @@ ActorPool.prototype = {
|
|||
addActor: function APAddActor(actor) {
|
||||
actor.conn = this.conn;
|
||||
if (!actor.actorID) {
|
||||
let prefix = actor.actorPrefix;
|
||||
// Older style actors use actorPrefix, while protocol.js-based actors use typeName
|
||||
let prefix = actor.actorPrefix || actor.typeName;
|
||||
if (!prefix && typeof actor == "function") {
|
||||
// typeName is a convention used with protocol.js-based actors
|
||||
prefix = actor.prototype.actorPrefix || actor.prototype.typeName;
|
||||
}
|
||||
actor.actorID = this.conn.allocID(prefix || undefined);
|
||||
|
|
Загрузка…
Ссылка в новой задаче