diff --git a/devtools/shared/protocol/Request.js b/devtools/shared/protocol/Request.js index 7ea71836715a..c1b8c2e27658 100644 --- a/devtools/shared/protocol/Request.js +++ b/devtools/shared/protocol/Request.js @@ -5,11 +5,7 @@ "use strict"; const { extend } = require("devtools/shared/extend"); -var { - findPlaceholders, - describeTemplate, - getPath, -} = require("devtools/shared/protocol/utils"); +var { findPlaceholders, getPath } = require("devtools/shared/protocol/utils"); var { types } = require("devtools/shared/protocol/types"); /** @@ -75,10 +71,6 @@ Request.prototype = { } return fnArgs; }, - - describe: function() { - return describeTemplate(this.template); - }, }; exports.Request = Request; @@ -120,13 +112,6 @@ Arg.prototype = { read: function(v, ctx, outArgs) { outArgs[this.index] = this.type.read(v, ctx); }, - - describe: function() { - return { - _arg: this.index, - type: this.type.name, - }; - }, }; // Outside of protocol.js, Arg is called as factory method, without the new keyword. @@ -173,13 +158,6 @@ Option.prototype = extend(Arg.prototype, { } outArgs[this.index][name] = this.type.read(v, ctx); }, - - describe: function() { - return { - _option: this.index, - type: this.type.name, - }; - }, }); // Outside of protocol.js, Option is called as factory method, without the new keyword. diff --git a/devtools/shared/protocol/Response.js b/devtools/shared/protocol/Response.js index 2b4575f6f802..c4374a2055f9 100644 --- a/devtools/shared/protocol/Response.js +++ b/devtools/shared/protocol/Response.js @@ -4,11 +4,7 @@ "use strict"; -var { - findPlaceholders, - getPath, - describeTemplate, -} = require("devtools/shared/protocol/utils"); +var { findPlaceholders, getPath } = require("devtools/shared/protocol/utils"); var { types } = require("devtools/shared/protocol/types"); /** @@ -76,10 +72,6 @@ Response.prototype = { const v = getPath(packet, this.path); return this.retVal.read(v, ctx); }, - - describe: function() { - return describeTemplate(this.template); - }, }; exports.Response = Response; @@ -105,12 +97,6 @@ RetVal.prototype = { read: function(v, ctx) { return this.type.read(v, ctx); }, - - describe: function() { - return { - _retval: this.type.name, - }; - }, }; // Outside of protocol.js, RetVal is called as factory method, without the new keyword. diff --git a/devtools/shared/protocol/utils.js b/devtools/shared/protocol/utils.js index f42fe8d8c679..3433c2f44655 100644 --- a/devtools/shared/protocol/utils.js +++ b/devtools/shared/protocol/utils.js @@ -4,19 +4,6 @@ "use strict"; -function describeTemplate(template) { - return JSON.parse( - JSON.stringify(template, (key, value) => { - if (value.describe) { - return value.describe(); - } - return value; - }) - ); -} - -exports.describeTemplate = describeTemplate; - /** * Find Placeholders in the template and save them along with their * paths.