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:
J. Ryan Stinnett 2017-01-25 17:44:41 -06:00
Родитель 534f8bfa90
Коммит 46f3ae9842
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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);