From 637be57afe944c3ebcf7e2f1c41a907fe3aa0958 Mon Sep 17 00:00:00 2001 From: Jordan Santell Date: Mon, 23 Feb 2015 10:46:00 +0100 Subject: [PATCH] Bug 1132474 - Further clarify restrictions of TabTarget's actor description methods in the comments. r=jryans --- browser/devtools/framework/target.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/browser/devtools/framework/target.js b/browser/devtools/framework/target.js index 6d0d4091eca9..50c7531dd589 100644 --- a/browser/devtools/framework/target.js +++ b/browser/devtools/framework/target.js @@ -184,7 +184,13 @@ TabTarget.prototype = { * Returns a promise for the protocol description from the root actor. * Used internally with `target.actorHasMethod`. Takes advantage of * caching if definition was fetched previously with the corresponding - * actor information. Must be a remote target. + * actor information. Actors are lazily loaded, so not only must the tool using + * a specific actor be in use, the actors are only registered after invoking + * a method (for performance reasons, added in bug 988237), so to use these actor + * detection methods, one must already be communicating with a specific actor of + * that type. + * + * Must be a remote target. * * @return {Promise} * { @@ -250,7 +256,8 @@ TabTarget.prototype = { /** * Queries the protocol description to see if an actor has - * an available method. The actor must already be lazily-loaded, + * an available method. The actor must already be lazily-loaded (read + * the restrictions in the `getActorDescription` comments), * so this is for use inside of tool. Returns a promise that * resolves to a boolean. Must be a remote target. *