Bug 1399589 - Remove unused performance-entries actor. r=jdescottes

MozReview-Commit-ID: LaGB7vP5Pj2

--HG--
extra : rebase_source : e10f76b13e18815a1b07295f72cd8902a262e314
This commit is contained in:
Alexandre Poirot 2017-10-03 17:57:08 +02:00
parent 76914dd9bc
commit 8951f31f9f
7 changed files with 0 additions and 112 deletions

View File

@ -42,7 +42,6 @@ DevToolsModules(
'memory.js',
'monitor.js',
'object.js',
'performance-entries.js',
'performance-recording.js',
'performance.js',
'preference.js',

View File

@ -1,62 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/**
* The performanceEntries actor emits events corresponding to performance
* entries. It receives `performanceentry` events containing the performance
* entry details and emits an event containing the name, type, origin, and
* epoch of the performance entry.
*/
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
const performanceSpec = require("devtools/shared/specs/performance-entries");
var PerformanceEntriesActor = ActorClassWithSpec(performanceSpec, {
listenerAdded: false,
initialize: function (conn, tabActor) {
Actor.prototype.initialize.call(this, conn);
this.window = tabActor.window;
},
/**
* Start tracking the user timings.
*/
start: function () {
if (!this.listenerAdded) {
this.onPerformanceEntry = this.onPerformanceEntry.bind(this);
this.window.addEventListener("performanceentry", this.onPerformanceEntry, true);
this.listenerAdded = true;
}
},
/**
* Stop tracking the user timings.
*/
stop: function () {
if (this.listenerAdded) {
this.window.removeEventListener("performanceentry", this.onPerformanceEntry, true);
this.listenerAdded = false;
}
},
destroy: function () {
this.stop();
Actor.prototype.destroy.call(this);
},
onPerformanceEntry: function (e) {
let emitDetail = {
type: e.entryType,
name: e.name,
origin: e.origin,
epoch: e.epoch
};
this.emit("entry", emitDetail);
}
});
exports.PerformanceEntriesActor = PerformanceEntriesActor;

View File

@ -564,11 +564,6 @@ var DebuggerServer = {
constructor: "PromisesActor",
type: { tab: true }
});
this.registerModule("devtools/server/actors/performance-entries", {
prefix: "performanceEntries",
constructor: "PerformanceEntriesActor",
type: { tab: true }
});
this.registerModule("devtools/server/actors/emulation", {
prefix: "emulation",
constructor: "EmulationActor",

View File

@ -22,7 +22,6 @@ DevToolsModules(
'inspector.js',
'layout.js',
'memory.js',
'performance-entries.js',
'performance-recording.js',
'performance.js',
'preference.js',

View File

@ -1,17 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
const performanceSpec = require("devtools/shared/specs/performance-entries");
var PerformanceEntriesFront = FrontClassWithSpec(performanceSpec, {
initialize: function (client, form) {
Front.prototype.initialize.call(this, client);
this.actorID = form.performanceEntriesActor;
this.manage(this);
},
});
exports.PerformanceEntriesFront = PerformanceEntriesFront;

View File

@ -28,7 +28,6 @@ DevToolsModules(
'layout.js',
'memory.js',
'node.js',
'performance-entries.js',
'performance-recording.js',
'performance.js',
'preference.js',

View File

@ -1,25 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Arg, generateActorSpec } = require("devtools/shared/protocol");
const performanceEntriesSpec = generateActorSpec({
typeName: "performanceEntries",
events: {
"entry": {
type: "entry",
// object containing performance entry name, type, origin, and epoch.
detail: Arg(0, "json")
}
},
methods: {
start: {},
stop: {}
}
});
exports.performanceEntriesSpec = performanceEntriesSpec;