Bug 1432496 - Clean up protocol.js deprecations. r=jdescottes draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 23 Jan 2018 09:15:49 -0600
changeset 723577 b6421432638d5ff72819afd7ab4135ddb7abdbcd
parent 723576 71bd7447376a513c989732ae3958e92b649c242d
child 746897 5ddacb29e70c7d8bd4289c260663b427f1861dcb
push id96470
push userbmo:jryans@gmail.com
push dateTue, 23 Jan 2018 15:18:00 +0000
reviewersjdescottes
bugs1432496
milestone59.0a1
Bug 1432496 - Clean up protocol.js deprecations. r=jdescottes `ActorClass` and `FrontClass` are depercated protocol.js APIs that were left in place to support add-ons that might have used them. Now that we're in an WebExtensions only mode, it seems safe to remove these. MozReview-Commit-ID: HRKMPTIktrZ
devtools/shared/protocol.js
--- a/devtools/shared/protocol.js
+++ b/devtools/shared/protocol.js
@@ -1149,33 +1149,16 @@ var generateRequestHandlers = function (
   });
 
   actorProto._actorSpec = actorSpec;
 
   return actorProto;
 };
 
 /**
- * THIS METHOD IS DEPRECATED, AND PRESERVED ONLY FOR ADD-ONS. IT SHOULD NOT BE
- * USED INSIDE THE TREE.
- *
- * Create an actor class for the given actor prototype.
- *
- * @param object actorProto
- *    The actor prototype.  Must have a 'typeName' property,
- *    should have method definitions, can have event definitions.
- */
-exports.ActorClass = function (actorProto) {
-  return ActorClassWithSpec(generateActorSpec(actorProto), actorProto);
-};
-
-/**
- * THIS METHOD IS DEPRECATED, AND PRESERVED ONLY FOR ADD-ONS. IT SHOULD NOT BE
- * USED INSIDE THE TREE.
- *
  * Create an actor class for the given actor specification and prototype.
  *
  * @param object actorSpec
  *    The actor specification. Must have a 'typeName' property.
  * @param object actorProto
  *    The actor prototype. Should have method definitions, can have event
  *    definitions.
  */
@@ -1397,20 +1380,16 @@ exports.preEvent = function (eventName, 
  *      impl (string): If provided, the generated front method will be
  *        stored as this property on the prototype.
  */
 exports.custom = function (fn, options = {}) {
   fn._customFront = options;
   return fn;
 };
 
-function prototypeOf(obj) {
-  return typeof (obj) === "function" ? obj.prototype : obj;
-}
-
 /**
  * Generates request methods as described by the given actor specification on
  * the given front prototype. Returns the front prototype.
  */
 var generateRequestMethods = function (actorSpec, frontProto) {
   if (frontProto._actorSpec) {
     throw new Error("frontProto called twice on the same front prototype!");
   }
@@ -1513,29 +1492,16 @@ var generateRequestMethods = function (a
   }
 
   frontProto._actorSpec = actorSpec;
 
   return frontProto;
 };
 
 /**
- * Create a front class for the given actor class and front prototype.
- *
- * @param ActorClass actorType
- *    The actor class you're creating a front for.
- * @param object frontProto
- *    The front prototype.  Must have a 'typeName' property,
- *    should have method definitions, can have event definitions.
- */
-exports.FrontClass = function (actorType, frontProto) {
-  return FrontClassWithSpec(prototypeOf(actorType)._actorSpec, frontProto);
-};
-
-/**
  * Create a front class for the given actor specification and front prototype.
  *
  * @param object actorSpec
  *    The actor specification you're creating a front for.
  * @param object proto
  *    The object prototype.  Must have a 'typeName' property,
  *    should have method definitions, can have event definitions.
  */