Bug 985094 - Show typeName from protocol.js in listTabs reply. r=past
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 18 Mar 2014 15:16:43 -0500
changeset 174814 79617d6625f6a33d007092731886daa2c7136dff
parent 174813 18f579c4308eab391b110a135678cef3764470f4
child 174815 aa2073a4e646f55626a3e80c3d7d03959c4ce259
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerspast
bugs985094
milestone31.0a1
Bug 985094 - Show typeName from protocol.js in listTabs reply. r=past
toolkit/devtools/server/main.js
--- a/toolkit/devtools/server/main.js
+++ b/toolkit/devtools/server/main.js
@@ -798,17 +798,18 @@ ActorPool.prototype = {
    *        'disconnect' property, it will be called when the actor
    *        pool is cleaned up.
    */
   addActor: function AP_addActor(aActor) {
     aActor.conn = this.conn;
     if (!aActor.actorID) {
       let prefix = aActor.actorPrefix;
       if (typeof aActor == "function") {
-        prefix = aActor.prototype.actorPrefix;
+        // typeName is a convention used with protocol.js-based actors
+        prefix = aActor.prototype.actorPrefix || aActor.prototype.typeName;
       }
       aActor.actorID = this.conn.allocID(prefix || undefined);
     }
 
     if (aActor.registeredPool) {
       aActor.registeredPool.removeActor(aActor);
     }
     aActor.registeredPool = this;