From 8bedcbc2ba9a0a609d1170d06967ceaa495312f2 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 26 Sep 2014 09:35:00 +0200 Subject: [PATCH] Bug 1073522 - Better error when front has no actor. r=dcamp --- toolkit/devtools/server/protocol.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/toolkit/devtools/server/protocol.js b/toolkit/devtools/server/protocol.js index 4b7631f69003..b9e9f9b7f661 100644 --- a/toolkit/devtools/server/protocol.js +++ b/toolkit/devtools/server/protocol.js @@ -1061,6 +1061,14 @@ let Front = Class({ this.actorID = null; }, + manage: function(front) { + if (!front.actorID) { + throw new Error("Can't manage front without an actor ID.\n" + + "Ensure server supports " + front.typeName + "."); + } + return Pool.prototype.manage.call(this, front); + }, + /** * @returns a promise that will resolve to the actorID this front * represents.