Bug 1288423 - Rename Actor/FrontClassWithSpec to Actor/FrontClass. r=fitzgen

This commit is contained in:
Eddy Bruel 2016-08-10 17:36:04 +02:00
Родитель 4946e9577a
Коммит 2bdbd75fa0
85 изменённых файлов: 175 добавлений и 175 удалений

Просмотреть файл

@ -8,7 +8,7 @@
// by NodeActor actor (see 'onNodeActorForm' method).
const Events = require("sdk/event/core");
const {ActorClassWithSpec, Actor, FrontClassWithSpec, Front, generateActorSpec} =
const {ActorClass, Actor, FrontClass, Front, generateActorSpec} =
require("devtools/shared/protocol");
const {NodeActor} = require("devtools/server/actors/inspector");
@ -28,7 +28,7 @@ var eventsSpec = generateActorSpec({
}
});
var EventsFormActor = ActorClassWithSpec(eventsSpec, {
var EventsFormActor = ActorClass(eventsSpec, {
initialize: function () {
Actor.prototype.initialize.apply(this, arguments);
},
@ -50,7 +50,7 @@ var EventsFormActor = ActorClassWithSpec(eventsSpec, {
}
});
var EventsFormFront = FrontClassWithSpec(eventsSpec, {
var EventsFormFront = FrontClass(eventsSpec, {
initialize: function (client, form) {
Front.prototype.initialize.apply(this, arguments);

Просмотреть файл

@ -264,7 +264,7 @@ var testSpec = protocol.generateActorSpec({
}
});
var TestActor = exports.TestActor = protocol.ActorClassWithSpec(testSpec, {
var TestActor = exports.TestActor = protocol.ActorClass(testSpec, {
initialize: function (conn, tabActor, options) {
this.conn = conn;
this.tabActor = tabActor;
@ -717,7 +717,7 @@ var TestActor = exports.TestActor = protocol.ActorClassWithSpec(testSpec, {
}
});
var TestActorFront = exports.TestActorFront = protocol.FrontClassWithSpec(testSpec, {
var TestActorFront = exports.TestActorFront = protocol.FrontClass(testSpec, {
initialize: function (client, { testActor }, toolbox) {
protocol.Front.prototype.initialize.call(this, client, { actor: testActor });
this.manage(this);

Просмотреть файл

@ -17,7 +17,7 @@ const { actorActorSpec, actorRegistrySpec } = require("devtools/shared/specs/act
* The ActorActor gives you a handle to an actor you've dynamically
* registered and allows you to unregister it.
*/
const ActorActor = protocol.ActorClassWithSpec(actorActorSpec, {
const ActorActor = protocol.ActorClass(actorActorSpec, {
initialize: function (conn, options) {
protocol.Actor.prototype.initialize.call(this, conn);
@ -33,7 +33,7 @@ const ActorActor = protocol.ActorClassWithSpec(actorActorSpec, {
* The ActorRegistryActor allows clients to define new actors on the
* server. This is particularly useful for addons.
*/
const ActorRegistryActor = protocol.ActorClassWithSpec(actorRegistrySpec, {
const ActorRegistryActor = protocol.ActorClass(actorRegistrySpec, {
initialize: function (conn) {
protocol.Actor.prototype.initialize.call(this, conn);
},

Просмотреть файл

@ -10,7 +10,7 @@ const {FileUtils} = require("resource://gre/modules/FileUtils.jsm");
const {Task} = require("devtools/shared/task");
const {addonsSpec} = require("devtools/shared/specs/addons");
const AddonsActor = protocol.ActorClassWithSpec(addonsSpec, {
const AddonsActor = protocol.ActorClass(addonsSpec, {
initialize: function (conn) {
protocol.Actor.prototype.initialize.call(this, conn);

Просмотреть файл

@ -29,7 +29,7 @@ const {Cu} = require("chrome");
const promise = require("promise");
const {Task} = require("devtools/shared/task");
const protocol = require("devtools/shared/protocol");
const {Actor, ActorClassWithSpec} = protocol;
const {Actor, ActorClass} = protocol;
const {animationPlayerSpec, animationsSpec} = require("devtools/shared/specs/animation");
const events = require("sdk/event/core");
@ -51,7 +51,7 @@ exports.ANIMATION_TYPES = ANIMATION_TYPES;
*
* This actor also allows playing, pausing and seeking the animation.
*/
var AnimationPlayerActor = protocol.ActorClassWithSpec(animationPlayerSpec, {
var AnimationPlayerActor = protocol.ActorClass(animationPlayerSpec, {
/**
* @param {AnimationsActor} The main AnimationsActor instance
* @param {AnimationPlayer} The player object returned by getAnimationPlayers
@ -433,7 +433,7 @@ exports.AnimationPlayerActor = AnimationPlayerActor;
/**
* The Animations actor lists animation players for a given node.
*/
var AnimationsActor = exports.AnimationsActor = protocol.ActorClassWithSpec(animationsSpec, {
var AnimationsActor = exports.AnimationsActor = protocol.ActorClass(animationsSpec, {
initialize: function(conn, tabActor) {
Actor.prototype.initialize.call(this, conn);
this.tabActor = tabActor;

Просмотреть файл

@ -6,7 +6,7 @@
"use strict";
const { ActorClassWithSpec } = require("devtools/shared/protocol");
const { ActorClass } = require("devtools/shared/protocol");
const { breakpointSpec } = require("devtools/shared/specs/breakpoint");
/**
@ -34,7 +34,7 @@ exports.setBreakpointAtEntryPoints = setBreakpointAtEntryPoints;
* responsible for deleting breakpoints, handling breakpoint hits and
* associating breakpoints with scripts.
*/
let BreakpointActor = ActorClassWithSpec(breakpointSpec, {
let BreakpointActor = ActorClass(breakpointSpec, {
/**
* Create a Breakpoint actor.
*

Просмотреть файл

@ -18,7 +18,7 @@ const { CallWatcherFront } = require("devtools/shared/fronts/call-watcher");
* This actor contains information about a function call, like the function
* type, name, stack, arguments, returned value etc.
*/
var FunctionCallActor = protocol.ActorClassWithSpec(functionCallSpec, {
var FunctionCallActor = protocol.ActorClass(functionCallSpec, {
/**
* Creates the function call actor.
*
@ -226,7 +226,7 @@ var FunctionCallActor = protocol.ActorClassWithSpec(functionCallSpec, {
/**
* This actor observes function calls on certain objects or globals.
*/
var CallWatcherActor = exports.CallWatcherActor = protocol.ActorClassWithSpec(callWatcherSpec, {
var CallWatcherActor = exports.CallWatcherActor = protocol.ActorClass(callWatcherSpec, {
initialize: function (conn, tabActor) {
protocol.Actor.prototype.initialize.call(this, conn);
this.tabActor = tabActor;

Просмотреть файл

@ -30,7 +30,7 @@ const {method, custom, Arg, Option, RetVal} = protocol;
* all the corresponding canvas' context methods invoked in that frame,
* thumbnails for each draw call and a screenshot of the end result.
*/
var FrameSnapshotActor = protocol.ActorClassWithSpec(frameSnapshotSpec, {
var FrameSnapshotActor = protocol.ActorClass(frameSnapshotSpec, {
/**
* Creates the frame snapshot call actor.
*
@ -120,7 +120,7 @@ var FrameSnapshotActor = protocol.ActorClassWithSpec(frameSnapshotSpec, {
* of a 2D or WebGL context, to provide information regarding all the calls
* made when drawing frame inside an animation loop.
*/
var CanvasActor = exports.CanvasActor = protocol.ActorClassWithSpec(canvasSpec, {
var CanvasActor = exports.CanvasActor = protocol.ActorClass(canvasSpec, {
// Reset for each recording, boolean indicating whether or not
// any draw calls were called for a recording.
_animationContainsDrawCall: false,

Просмотреть файл

@ -511,7 +511,7 @@ exports.actorBridge = actorBridge;
/**
* Like `actorBridge`, but without a spec definition, for when the actor is
* created with `ActorClassWithSpec` rather than vanilla `ActorClass`.
* created with `ActorClass` rather than vanilla `ActorClass`.
*/
function actorBridgeWithSpec (methodName) {
return method(function () {

Просмотреть файл

@ -15,12 +15,12 @@ loader.lazyGetter(this, "appInfo", () => {
});
const protocol = require("devtools/shared/protocol");
const { ActorClassWithSpec, Actor } = protocol;
const { ActorClass, Actor } = protocol;
const { cssPropertiesSpec } = require("devtools/shared/specs/css-properties");
const { CSS_PROPERTIES, CSS_TYPES } = require("devtools/shared/css-properties-db");
const { cssColors } = require("devtools/shared/css-color-db");
exports.CssPropertiesActor = ActorClassWithSpec(cssPropertiesSpec, {
exports.CssPropertiesActor = ActorClass(cssPropertiesSpec, {
typeName: "cssProperties",
initialize(conn, parent) {

Просмотреть файл

@ -67,7 +67,7 @@ const l10n = exports.l10n = {
* }, ...
* });
*/
var CSSUsageActor = protocol.ActorClassWithSpec(cssUsageSpec, {
var CSSUsageActor = protocol.ActorClass(cssUsageSpec, {
initialize: function (conn, tabActor) {
protocol.Actor.prototype.initialize.call(this, conn);

Просмотреть файл

@ -15,7 +15,7 @@ const {deviceSpec} = require("devtools/shared/specs/device");
const FileReader = require("FileReader");
const {PermissionsTable} = require("resource://gre/modules/PermissionsTable.jsm");
var DeviceActor = exports.DeviceActor = protocol.ActorClassWithSpec(deviceSpec, {
var DeviceActor = exports.DeviceActor = protocol.ActorClass(deviceSpec, {
_desc: null,
getDescription: function () {

Просмотреть файл

@ -38,7 +38,7 @@ const ERR_DIRECTOR_UNINSTALLED_SCRIPTID = "uninstalled director-script id";
* A MessagePort Actor allowing communication through messageport events
* over the remote debugging protocol.
*/
var MessagePortActor = exports.MessagePortActor = protocol.ActorClassWithSpec(messagePortSpec, {
var MessagePortActor = exports.MessagePortActor = protocol.ActorClass(messagePortSpec, {
/**
* Create a MessagePort actor.
*
@ -149,7 +149,7 @@ var MessagePortActor = exports.MessagePortActor = protocol.ActorClassWithSpec(me
* directly connect the debugger client and the content script using a MessageChannel) on tab
* navigation.
*/
var DirectorScriptActor = exports.DirectorScriptActor = protocol.ActorClassWithSpec(directorScriptSpec, {
var DirectorScriptActor = exports.DirectorScriptActor = protocol.ActorClass(directorScriptSpec, {
/**
* Creates the director script actor
*
@ -337,7 +337,7 @@ var DirectorScriptActor = exports.DirectorScriptActor = protocol.ActorClassWithS
/**
* The DirectorManager Actor is a tab actor which manages enabling/disabling director scripts.
*/
const DirectorManagerActor = exports.DirectorManagerActor = protocol.ActorClassWithSpec(directorManagerSpec, {
const DirectorManagerActor = exports.DirectorManagerActor = protocol.ActorClass(directorManagerSpec, {
/* init & destroy methods */
initialize: function (conn, tabActor) {
protocol.Actor.prototype.initialize.call(this, conn);

Просмотреть файл

@ -155,7 +155,7 @@ exports.setupParentProcess = function setupParentProcess({mm, prefix}) {
* The DirectorRegistry Actor is a global actor which manages install/uninstall of
* director scripts definitions.
*/
const DirectorRegistryActor = exports.DirectorRegistryActor = protocol.ActorClassWithSpec(directorRegistrySpec, {
const DirectorRegistryActor = exports.DirectorRegistryActor = protocol.ActorClass(directorRegistrySpec, {
/* init & destroy methods */
initialize: function (conn, parentActor) {
protocol.Actor.prototype.initialize.call(this, conn);

Просмотреть файл

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { ActorClassWithSpec } = require("devtools/shared/protocol");
const { ActorClass } = require("devtools/shared/protocol");
const { createValueGrip } = require("devtools/server/actors/object");
const { environmentSpec } = require("devtools/shared/specs/environment");
@ -19,7 +19,7 @@ const { environmentSpec } = require("devtools/shared/specs/environment");
* @param ThreadActor aThreadActor
* The parent thread actor that contains this environment.
*/
let EnvironmentActor = ActorClassWithSpec(environmentSpec, {
let EnvironmentActor = ActorClass(environmentSpec, {
initialize: function (environment, threadActor) {
this.obj = environment;
this.threadActor = threadActor;

Просмотреть файл

@ -13,11 +13,11 @@
const {Ci} = require("chrome");
const Services = require("Services");
const {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");
const {Actor, ActorClassWithSpec} = require("devtools/shared/protocol");
const {Actor, ActorClass} = require("devtools/shared/protocol");
const events = require("sdk/event/core");
const {eventLoopLagSpec} = require("devtools/shared/specs/eventlooplag");
var EventLoopLagActor = exports.EventLoopLagActor = ActorClassWithSpec(eventLoopLagSpec, {
var EventLoopLagActor = exports.EventLoopLagActor = ActorClass(eventLoopLagSpec, {
_observerAdded: false,
/**

Просмотреть файл

@ -8,13 +8,13 @@
const { ActorPool } = require("devtools/server/actors/common");
const { createValueGrip } = require("devtools/server/actors/object");
const { ActorClassWithSpec } = require("devtools/shared/protocol");
const { ActorClass } = require("devtools/shared/protocol");
const { frameSpec } = require("devtools/shared/specs/frame");
/**
* An actor for a specified stack frame.
*/
let FrameActor = ActorClassWithSpec(frameSpec, {
let FrameActor = ActorClass(frameSpec, {
/**
* Creates the Frame actor.
*

Просмотреть файл

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
const { Actor, ActorClass } = require("devtools/shared/protocol");
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
const { on, once, off, emit } = require("sdk/event/core");
const { Framerate } = require("devtools/server/performance/framerate");
@ -15,7 +15,7 @@ const { framerateSpec } = require("devtools/shared/specs/framerate");
*
* @see devtools/server/performance/framerate.js for documentation.
*/
var FramerateActor = exports.FramerateActor = ActorClassWithSpec(framerateSpec, {
var FramerateActor = exports.FramerateActor = ActorClass(framerateSpec, {
initialize: function (conn, tabActor) {
Actor.prototype.initialize.call(this, conn);
this.bridge = new Framerate(tabActor);

Просмотреть файл

@ -6,7 +6,7 @@
const { Task } = require("devtools/shared/task");
const {
method, Arg, Option, RetVal, Actor, ActorClassWithSpec
method, Arg, Option, RetVal, Actor, ActorClass
} = require("devtools/shared/protocol");
const { gcliSpec } = require("devtools/shared/specs/gcli");
const events = require("sdk/event/core");
@ -15,7 +15,7 @@ const { createSystem } = require("gcli/system");
/**
* Manage remote connections that want to talk to GCLI
*/
const GcliActor = ActorClassWithSpec(gcliSpec, {
const GcliActor = ActorClass(gcliSpec, {
initialize: function (conn, tabActor) {
Actor.prototype.initialize.call(this, conn);

Просмотреть файл

@ -23,7 +23,7 @@ loader.lazyRequireGetter(this, "HeapSnapshotFileUtils",
* because child processes are sandboxed and do not have access to the file
* system.
*/
exports.HeapSnapshotFileActor = protocol.ActorClassWithSpec(heapSnapshotFileSpec, {
exports.HeapSnapshotFileActor = protocol.ActorClass(heapSnapshotFileSpec, {
initialize: function (conn, parent) {
if (Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT) {
const err = new Error("Attempt to create a HeapSnapshotFileActor in a " +

Просмотреть файл

@ -82,7 +82,7 @@ exports.register = register;
/**
* The HighlighterActor class
*/
var HighlighterActor = exports.HighlighterActor = protocol.ActorClassWithSpec(highlighterSpec, {
var HighlighterActor = exports.HighlighterActor = protocol.ActorClass(highlighterSpec, {
initialize: function (inspector, autohide) {
protocol.Actor.prototype.initialize.call(this, null);
@ -407,7 +407,7 @@ var HighlighterActor = exports.HighlighterActor = protocol.ActorClassWithSpec(hi
* A generic highlighter actor class that instantiate a highlighter given its
* type name and allows to show/hide it.
*/
var CustomHighlighterActor = exports.CustomHighlighterActor = protocol.ActorClassWithSpec(customHighlighterSpec, {
var CustomHighlighterActor = exports.CustomHighlighterActor = protocol.ActorClass(customHighlighterSpec, {
/**
* Create a highlighter instance given its typename
* The typename must be one of HIGHLIGHTER_CLASSES and the class must

Просмотреть файл

@ -197,7 +197,7 @@ exports.getNodeDisplayName = getNodeDisplayName;
/**
* Server side of the node actor.
*/
var NodeActor = exports.NodeActor = protocol.ActorClassWithSpec(nodeSpec, {
var NodeActor = exports.NodeActor = protocol.ActorClass(nodeSpec, {
initialize: function (walker, node) {
protocol.Actor.prototype.initialize.call(this, null);
this.walker = walker;
@ -708,7 +708,7 @@ var NodeActor = exports.NodeActor = protocol.ActorClassWithSpec(nodeSpec, {
/**
* Server side of a node list as returned by querySelectorAll()
*/
var NodeListActor = exports.NodeListActor = protocol.ActorClassWithSpec(nodeListSpec, {
var NodeListActor = exports.NodeListActor = protocol.ActorClass(nodeListSpec, {
typeName: "domnodelist",
initialize: function (walker, nodeList) {
@ -766,7 +766,7 @@ var NodeListActor = exports.NodeListActor = protocol.ActorClassWithSpec(nodeList
/**
* Server side of the DOM walker.
*/
var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
var WalkerActor = protocol.ActorClass(walkerSpec, {
/**
* Create the WalkerActor
* @param DebuggerServerConnection conn
@ -2578,7 +2578,7 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
* Server side of the inspector actor, which is used to create
* inspector-related actors, including the walker.
*/
exports.InspectorActor = protocol.ActorClassWithSpec(inspectorSpec, {
exports.InspectorActor = protocol.ActorClass(inspectorSpec, {
initialize: function (conn, tabActor) {
protocol.Actor.prototype.initialize.call(this, conn);
this.tabActor = tabActor;

Просмотреть файл

@ -36,7 +36,7 @@ const {reflowSpec} = require("devtools/shared/specs/layout");
/**
* The reflow actor tracks reflows and emits events about them.
*/
var ReflowActor = exports.ReflowActor = protocol.ActorClassWithSpec(reflowSpec, {
var ReflowActor = exports.ReflowActor = protocol.ActorClass(reflowSpec, {
initialize: function (conn, tabActor) {
protocol.Actor.prototype.initialize.call(this, conn);

Просмотреть файл

@ -23,7 +23,7 @@ loader.lazyRequireGetter(this, "StackFrameCache",
*
* @see devtools/server/performance/memory.js for documentation.
*/
exports.MemoryActor = protocol.ActorClassWithSpec(memorySpec, {
exports.MemoryActor = protocol.ActorClass(memorySpec, {
initialize: function (conn, parent, frameCache = new StackFrameCache()) {
protocol.Actor.prototype.initialize.call(this, conn);

Просмотреть файл

@ -9,11 +9,11 @@
* epoch of the performance entry.
*/
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
const { Actor, ActorClass } = require("devtools/shared/protocol");
const performanceSpec = require("devtools/shared/specs/performance-entries");
const events = require("sdk/event/core");
var PerformanceEntriesActor = ActorClassWithSpec(performanceSpec, {
var PerformanceEntriesActor = ActorClass(performanceSpec, {
listenerAdded: false,
initialize: function (conn, tabActor) {

Просмотреть файл

@ -5,7 +5,7 @@
"use strict";
const { Cu } = require("chrome");
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
const { Actor, ActorClass } = require("devtools/shared/protocol");
const { performanceRecordingSpec } = require("devtools/shared/specs/performance-recording");
loader.lazyRequireGetter(this, "merge", "sdk/util/object", true);
@ -20,7 +20,7 @@ loader.lazyRequireGetter(this, "PerformanceRecordingCommon",
*
* @see devtools/shared/shared/performance.js for documentation.
*/
const PerformanceRecordingActor = ActorClassWithSpec(performanceRecordingSpec, merge({
const PerformanceRecordingActor = ActorClass(performanceRecordingSpec, merge({
form: function (detail) {
if (detail === "actorid") {
return this.actorID;

Просмотреть файл

@ -6,7 +6,7 @@
const { Cu } = require("chrome");
const { Task } = require("devtools/shared/task");
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
const { Actor, ActorClass } = require("devtools/shared/protocol");
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
const { performanceSpec } = require("devtools/shared/specs/performance");
@ -33,7 +33,7 @@ const RECORDING_STATE_CHANGE_EVENTS = new Set([
*
* @see devtools/shared/shared/performance.js for documentation.
*/
var PerformanceActor = ActorClassWithSpec(performanceSpec, {
var PerformanceActor = ActorClass(performanceSpec, {
traits: {
features: {
withMarkers: true,

Просмотреть файл

@ -15,7 +15,7 @@ exports.register = function (handle) {
exports.unregister = function (handle) {
};
var PreferenceActor = exports.PreferenceActor = protocol.ActorClassWithSpec(preferenceSpec, {
var PreferenceActor = exports.PreferenceActor = protocol.ActorClass(preferenceSpec, {
typeName: "preference",
getBoolPref: function (name) {

Просмотреть файл

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
const { Actor, ActorClass } = require("devtools/shared/protocol");
const { Profiler } = require("devtools/server/performance/profiler");
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
const { profilerSpec } = require("devtools/shared/specs/profiler");
@ -16,7 +16,7 @@ loader.lazyRequireGetter(this, "events", "sdk/event/core");
*
* @see devtools/server/performance/profiler.js for documentation.
*/
var ProfilerActor = exports.ProfilerActor = ActorClassWithSpec(profilerSpec, {
var ProfilerActor = exports.ProfilerActor = ActorClass(profilerSpec, {
initialize: function (conn) {
Actor.prototype.initialize.call(this, conn);
this._onProfilerEvent = this._onProfilerEvent.bind(this);

Просмотреть файл

@ -15,7 +15,7 @@ loader.lazyRequireGetter(this, "events", "sdk/event/core");
* The Promises Actor provides support for getting the list of live promises and
* observing changes to their settlement state.
*/
var PromisesActor = protocol.ActorClassWithSpec(promisesSpec, {
var PromisesActor = protocol.ActorClass(promisesSpec, {
/**
* @param conn DebuggerServerConnection.
* @param parent TabActor|RootActor

Просмотреть файл

@ -15,7 +15,7 @@ const { FrameActor } = require("devtools/server/actors/frame");
const { ObjectActor, createValueGrip, longStringGrip } = require("devtools/server/actors/object");
const { SourceActor, getSourceURL } = require("devtools/server/actors/source");
const { DebuggerServer } = require("devtools/server/main");
const { ActorClassWithSpec } = require("devtools/shared/protocol");
const { ActorClass } = require("devtools/shared/protocol");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
const flags = require("devtools/shared/flags");
const { assert, dumpn, update, fetch } = DevToolsUtils;
@ -408,7 +408,7 @@ EventLoop.prototype = {
* An optional (for content debugging only) reference to the content
* window.
*/
const ThreadActor = ActorClassWithSpec(threadSpec, {
const ThreadActor = ActorClass(threadSpec, {
initialize: function (aParent, aGlobal) {
this._state = "detached";
this._frameActors = [];

Просмотреть файл

@ -64,7 +64,7 @@ function loadSettingsFile() {
}
}
var SettingsActor = exports.SettingsActor = protocol.ActorClassWithSpec(settingsSpec, {
var SettingsActor = exports.SettingsActor = protocol.ActorClass(settingsSpec, {
_getSettingsService: function () {
let win = Services.wm.getMostRecentWindow(DebuggerServer.chromeWindowType);
return win.navigator.mozSettings;

Просмотреть файл

@ -11,7 +11,7 @@ const Services = require("Services");
const { BreakpointActor, setBreakpointAtEntryPoints } = require("devtools/server/actors/breakpoint");
const { OriginalLocation, GeneratedLocation } = require("devtools/server/actors/common");
const { createValueGrip } = require("devtools/server/actors/object");
const { ActorClassWithSpec, Arg, RetVal, method } = require("devtools/shared/protocol");
const { ActorClass, Arg, RetVal, method } = require("devtools/shared/protocol");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
const { assert, fetch } = DevToolsUtils;
const { joinURI } = require("devtools/shared/path");
@ -141,7 +141,7 @@ function resolveURIToLocalPath(aURI) {
* @param String contentType
* Optional. The content type of this source, if immediately available.
*/
let SourceActor = ActorClassWithSpec(sourceSpec, {
let SourceActor = ActorClass(sourceSpec, {
typeName: "source",
initialize: function ({ source, thread, originalUrl, generatedSource,

Просмотреть файл

@ -379,7 +379,7 @@ StorageActors.createActor = function (options = {}, overrides = {}) {
}
let actorSpec = specs.childSpecs[options.typeName];
let actor = protocol.ActorClassWithSpec(actorSpec, actorObject);
let actor = protocol.ActorClass(actorSpec, actorObject);
storageTypePool.set(actorObject.typeName, actor);
};
@ -2169,7 +2169,7 @@ exports.setupParentProcessForIndexedDB = function ({mm, prefix}) {
/**
* The main Storage Actor.
*/
let StorageActor = protocol.ActorClassWithSpec(specs.storageSpec, {
let StorageActor = protocol.ActorClass(specs.storageSpec, {
typeName: "storage",
get window() {

Просмотреть файл

@ -11,7 +11,7 @@ var promise = require("promise");
var protocol = require("devtools/shared/protocol");
const {longStringSpec} = require("devtools/shared/specs/string");
exports.LongStringActor = protocol.ActorClassWithSpec(longStringSpec, {
exports.LongStringActor = protocol.ActorClass(longStringSpec, {
initialize: function (conn, str) {
protocol.Actor.prototype.initialize.call(this, conn);
this.str = str;

Просмотреть файл

@ -28,7 +28,7 @@ transition-property: all !important;\
var LOAD_ERROR = "error-load";
var OldStyleSheetActor = protocol.ActorClassWithSpec(oldStyleSheetSpec, {
var OldStyleSheetActor = protocol.ActorClass(oldStyleSheetSpec, {
toString: function() {
return "[OldStyleSheetActor " + this.actorID + "]";
},
@ -321,7 +321,7 @@ exports.OldStyleSheetActor = OldStyleSheetActor;
* Creates a StyleEditorActor. StyleEditorActor provides remote access to the
* stylesheets of a document.
*/
var StyleEditorActor = exports.StyleEditorActor = protocol.ActorClassWithSpec(styleEditorSpec, {
var StyleEditorActor = exports.StyleEditorActor = protocol.ActorClass(styleEditorSpec, {
/**
* The window we work with, taken from the parent actor.
*/

Просмотреть файл

@ -39,7 +39,7 @@ const FONT_PREVIEW_OFFSET = 4;
* The PageStyle actor lets the client look at the styles on a page, as
* they are applied to a given node.
*/
var PageStyleActor = protocol.ActorClassWithSpec(pageStyleSpec, {
var PageStyleActor = protocol.ActorClass(pageStyleSpec, {
/**
* Create a PageStyleActor.
*
@ -925,7 +925,7 @@ exports.PageStyleActor = PageStyleActor;
* (which have a CSSStyle but no CSSRule) we create a StyleRuleActor
* with a special rule type (100).
*/
var StyleRuleActor = protocol.ActorClassWithSpec(styleRuleSpec, {
var StyleRuleActor = protocol.ActorClass(styleRuleSpec, {
initialize: function (pageStyle, item) {
protocol.Actor.prototype.initialize.call(this, null);
this.pageStyle = pageStyle;

Просмотреть файл

@ -60,7 +60,7 @@ let modifiedStyleSheets = new WeakMap();
* Actor representing an original source of a style sheet that was specified
* in a source map.
*/
var OriginalSourceActor = protocol.ActorClassWithSpec(originalSourceSpec, {
var OriginalSourceActor = protocol.ActorClass(originalSourceSpec, {
initialize: function (aUrl, aSourceMap, aParentActor) {
protocol.Actor.prototype.initialize.call(this, null);
@ -113,7 +113,7 @@ var OriginalSourceActor = protocol.ActorClassWithSpec(originalSourceSpec, {
* A MediaRuleActor lives on the server and provides access to properties
* of a DOM @media rule and emits events when it changes.
*/
var MediaRuleActor = protocol.ActorClassWithSpec(mediaRuleSpec, {
var MediaRuleActor = protocol.ActorClass(mediaRuleSpec, {
get window() {
return this.parentActor.window;
},
@ -183,7 +183,7 @@ var MediaRuleActor = protocol.ActorClassWithSpec(mediaRuleSpec, {
/**
* A StyleSheetActor represents a stylesheet on the server.
*/
var StyleSheetActor = protocol.ActorClassWithSpec(styleSheetSpec, {
var StyleSheetActor = protocol.ActorClass(styleSheetSpec, {
/* List of original sources that generated this stylesheet */
_originalSources: null,
@ -786,7 +786,7 @@ exports.StyleSheetActor = StyleSheetActor;
* Creates a StyleSheetsActor. StyleSheetsActor provides remote access to the
* stylesheets of a document.
*/
var StyleSheetsActor = protocol.ActorClassWithSpec(styleSheetsSpec, {
var StyleSheetsActor = protocol.ActorClass(styleSheetsSpec, {
/**
* The window we work with, taken from the parent actor.
*/

Просмотреть файл

@ -26,7 +26,7 @@ const events = require("sdk/event/core");
/**
* The timeline actor pops and forwards timeline markers registered in docshells.
*/
var TimelineActor = exports.TimelineActor = protocol.ActorClassWithSpec(timelineSpec, {
var TimelineActor = exports.TimelineActor = protocol.ActorClass(timelineSpec, {
/**
* Initializes this actor with the provided connection and tab actor.
*/

Просмотреть файл

@ -38,7 +38,7 @@ const AUDIO_GLOBALS = [
* An Audio Node actor allowing communication to a specific audio node in the
* Audio Context graph.
*/
var AudioNodeActor = exports.AudioNodeActor = protocol.ActorClassWithSpec(audionodeSpec, {
var AudioNodeActor = exports.AudioNodeActor = protocol.ActorClass(audionodeSpec, {
form: function (detail) {
if (detail === "actorid") {
return this.actorID;
@ -404,7 +404,7 @@ var AudioNodeActor = exports.AudioNodeActor = protocol.ActorClassWithSpec(audion
* high-level methods. After instantiating this actor, you'll need to set it
* up by calling setup().
*/
var WebAudioActor = exports.WebAudioActor = protocol.ActorClassWithSpec(webAudioSpec, {
var WebAudioActor = exports.WebAudioActor = protocol.ActorClass(webAudioSpec, {
initialize: function (conn, tabActor) {
protocol.Actor.prototype.initialize.call(this, conn);
this.tabActor = tabActor;

Просмотреть файл

@ -28,7 +28,7 @@ const PROGRAM_HIGHLIGHT_TRAIT = 2;
* You can either retrieve, or compile the source of a shader, which will
* automatically inflict the necessary changes to the WebGL state.
*/
var ShaderActor = protocol.ActorClassWithSpec(shaderSpec, {
var ShaderActor = protocol.ActorClass(shaderSpec, {
/**
* Create the shader actor.
*
@ -83,7 +83,7 @@ var ShaderActor = protocol.ActorClassWithSpec(shaderSpec, {
* A WebGL program is composed (at the moment, analogue to OpenGL ES 2.0)
* of two shaders: a vertex shader and a fragment shader.
*/
var ProgramActor = protocol.ActorClassWithSpec(programSpec, {
var ProgramActor = protocol.ActorClass(programSpec, {
/**
* Create the program actor.
*
@ -184,7 +184,7 @@ var ProgramActor = protocol.ActorClassWithSpec(programSpec, {
* high-level methods. After instantiating this actor, you'll need to set it
* up by calling setup().
*/
var WebGLActor = exports.WebGLActor = protocol.ActorClassWithSpec(webGLSpec, {
var WebGLActor = exports.WebGLActor = protocol.ActorClass(webGLSpec, {
initialize: function (conn, tabActor) {
protocol.Actor.prototype.initialize.call(this, conn);
this.tabActor = tabActor;

Просмотреть файл

@ -55,7 +55,7 @@ function matchWorkerDebugger(dbg, options) {
return true;
}
let WorkerActor = protocol.ActorClassWithSpec(workerSpec, {
let WorkerActor = protocol.ActorClass(workerSpec, {
initialize(conn, dbg) {
protocol.Actor.prototype.initialize.call(this, conn);
this._dbg = dbg;
@ -313,7 +313,7 @@ WorkerActorList.prototype = {
exports.WorkerActorList = WorkerActorList;
let PushSubscriptionActor = protocol.ActorClassWithSpec(pushSubscriptionSpec, {
let PushSubscriptionActor = protocol.ActorClass(pushSubscriptionSpec, {
initialize(conn, subscription) {
protocol.Actor.prototype.initialize.call(this, conn);
this._subscription = subscription;
@ -343,7 +343,7 @@ let PushSubscriptionActor = protocol.ActorClassWithSpec(pushSubscriptionSpec, {
let _serviceWorkerProcessScriptLoaded = false;
let ServiceWorkerRegistrationActor =
protocol.ActorClassWithSpec(serviceWorkerRegistrationSpec, {
protocol.ActorClass(serviceWorkerRegistrationSpec, {
/**
* Create the ServiceWorkerRegistrationActor
* @param DebuggerServerConnection conn

Просмотреть файл

@ -14,7 +14,7 @@ const helloSpec = protocol.generateActorSpec({
}
});
var HelloActor = protocol.ActorClassWithSpec(helloSpec, {
var HelloActor = protocol.ActorClass(helloSpec, {
initialize: function () {
protocol.Actor.prototype.initialize.apply(this, arguments);
this.counter = 0;

Просмотреть файл

@ -11,7 +11,7 @@ const helloSpec = protocol.generateActorSpec({
}
});
var HelloActor = protocol.ActorClassWithSpec(helloSpec, {
var HelloActor = protocol.ActorClass(helloSpec, {
hello: function () {
return;
}

Просмотреть файл

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
var {method, RetVal, Actor, ActorClassWithSpec, Front, FrontClassWithSpec,
var {method, RetVal, Actor, ActorClass, Front, FrontClass,
generateActorSpec} = require("devtools/shared/protocol");
var Services = require("Services");
@ -15,7 +15,7 @@ const lazySpec = generateActorSpec({
}
});
exports.LazyActor = ActorClassWithSpec(lazySpec, {
exports.LazyActor = ActorClass(lazySpec, {
initialize: function (conn, id) {
Actor.prototype.initialize.call(this, conn);
@ -29,7 +29,7 @@ exports.LazyActor = ActorClassWithSpec(lazySpec, {
Services.obs.notifyObservers(null, "actor", "loaded");
exports.LazyFront = FrontClassWithSpec(lazySpec, {
exports.LazyFront = FrontClass(lazySpec, {
initialize: function (client, form) {
Front.prototype.initialize.call(this, client);
this.actorID = form.lazyActor;

Просмотреть файл

@ -28,7 +28,7 @@ const rootSpec = protocol.generateActorSpec({
}
});
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
var RootActor = protocol.ActorClass(rootSpec, {
typeName: "root",
initialize: function (conn) {
protocol.Actor.prototype.initialize.call(this, conn);
@ -45,7 +45,7 @@ var RootActor = protocol.ActorClassWithSpec(rootSpec, {
}
});
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
var RootFront = protocol.FrontClass(rootSpec, {
initialize: function (client) {
this.actorID = "root";
protocol.Front.prototype.initialize.call(this, client);

Просмотреть файл

@ -39,7 +39,7 @@ const rootSpec = protocol.generateActorSpec({
}
});
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
var RootActor = protocol.ActorClass(rootSpec, {
initialize: function (conn) {
protocol.Actor.prototype.initialize.call(this, conn);
// Root actor owns itself.
@ -89,7 +89,7 @@ var RootActor = protocol.ActorClassWithSpec(rootSpec, {
}
});
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
var RootFront = protocol.FrontClass(rootSpec, {
initialize: function (client) {
this.actorID = "root";
protocol.Front.prototype.initialize.call(this, client);

Просмотреть файл

@ -88,7 +88,7 @@ const childSpec = protocol.generateActorSpec({
}
});
var ChildActor = protocol.ActorClassWithSpec(childSpec, {
var ChildActor = protocol.ActorClass(childSpec, {
// Actors returned by this actor should be owned by the root actor.
marshallPool: function () { return this.parent(); },
@ -156,7 +156,7 @@ var ChildActor = protocol.ActorClassWithSpec(childSpec, {
release: function () { },
});
var ChildFront = protocol.FrontClassWithSpec(childSpec, {
var ChildFront = protocol.FrontClass(childSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client, form);
},
@ -226,7 +226,7 @@ const rootSpec = protocol.generateActorSpec({
});
var rootActor = null;
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
var RootActor = protocol.ActorClass(rootSpec, {
toString: function () { return "[root actor]"; },
initialize: function (conn) {
@ -287,7 +287,7 @@ var RootActor = protocol.ActorClassWithSpec(rootSpec, {
}
});
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
var RootFront = protocol.FrontClass(rootSpec, {
toString: function () { return "[root front]"; },
initialize: function (client) {
this.actorID = "root";

Просмотреть файл

@ -15,7 +15,7 @@ const childSpec = protocol.generateActorSpec({
});
// The child actor doesn't provide a form description
var ChildActor = protocol.ActorClassWithSpec(childSpec, {
var ChildActor = protocol.ActorClass(childSpec, {
initialize(conn) {
protocol.Actor.prototype.initialize.call(this, conn);
},
@ -32,7 +32,7 @@ var ChildActor = protocol.ActorClassWithSpec(childSpec, {
}
});
var ChildFront = protocol.FrontClassWithSpec(childSpec, {
var ChildFront = protocol.FrontClass(childSpec, {
initialize(client) {
protocol.Front.prototype.initialize.call(this, client);
},
@ -77,7 +77,7 @@ const rootSpec = protocol.generateActorSpec({
});
// The root actor does provide a form description.
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
var RootActor = protocol.ActorClass(rootSpec, {
initialize(conn) {
protocol.Actor.prototype.initialize.call(this, conn);
this.manage(this);
@ -125,7 +125,7 @@ var RootActor = protocol.ActorClassWithSpec(rootSpec, {
}
});
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
var RootFront = protocol.FrontClass(rootSpec, {
initialize(client) {
this.actorID = "root";
protocol.Front.prototype.initialize.call(this, client);

Просмотреть файл

@ -49,7 +49,7 @@ const rootSpec = protocol.generateActorSpec({
}
});
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
var RootActor = protocol.ActorClass(rootSpec, {
initialize: function (conn) {
rootActor = this;
protocol.Actor.prototype.initialize.call(this, conn);
@ -77,7 +77,7 @@ var RootActor = protocol.ActorClassWithSpec(rootSpec, {
},
});
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
var RootFront = protocol.FrontClass(rootSpec, {
initialize: function (client) {
this.actorID = "root";
protocol.Front.prototype.initialize.call(this, client);

Просмотреть файл

@ -101,7 +101,7 @@ const rootSpec = protocol.generateActorSpec({
}
});
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
var RootActor = protocol.ActorClass(rootSpec, {
initialize: function (conn) {
protocol.Actor.prototype.initialize.call(this, conn);
// Root actor owns itself.
@ -164,7 +164,7 @@ var RootActor = protocol.ActorClassWithSpec(rootSpec, {
}
});
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
var RootFront = protocol.FrontClass(rootSpec, {
initialize: function (client) {
this.actorID = "root";
protocol.Front.prototype.initialize.call(this, client);
@ -181,7 +181,7 @@ function run_test()
DebuggerServer.init();
check_except(() => {
let badActor = ActorClassWithSpec({}, {
let badActor = ActorClass({}, {
missing: preEvent("missing-event", function () {
})
});

Просмотреть файл

@ -32,7 +32,7 @@ const rootSpec = protocol.generateActorSpec({
}
});
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
var RootActor = protocol.ActorClass(rootSpec, {
initialize: function (conn) {
protocol.Actor.prototype.initialize.call(this, conn);
// Root actor owns itself.
@ -48,7 +48,7 @@ var RootActor = protocol.ActorClassWithSpec(rootSpec, {
}
});
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
var RootFront = protocol.FrontClass(rootSpec, {
initialize: function (client) {
this.actorID = "root";
protocol.Front.prototype.initialize.call(this, client);

Просмотреть файл

@ -11,7 +11,7 @@ const { custom } = protocol;
loader.lazyImporter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
const ActorActorFront = protocol.FrontClassWithSpec(actorActorSpec, {
const ActorActorFront = protocol.FrontClass(actorActorSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client, form);
}
@ -46,7 +46,7 @@ function request(uri) {
});
}
const ActorRegistryFront = protocol.FrontClassWithSpec(actorRegistrySpec, {
const ActorRegistryFront = protocol.FrontClass(actorRegistrySpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client,
{ actor: form.actorRegistryActor });

Просмотреть файл

@ -6,7 +6,7 @@
const {addonsSpec} = require("devtools/shared/specs/addons");
const protocol = require("devtools/shared/protocol");
const AddonsFront = protocol.FrontClassWithSpec(addonsSpec, {
const AddonsFront = protocol.FrontClass(addonsSpec, {
initialize: function (client, {addonsActor}) {
protocol.Front.prototype.initialize.call(this, client);
this.actorID = addonsActor;

Просмотреть файл

@ -5,7 +5,7 @@
const {
Front,
FrontClassWithSpec,
FrontClass,
custom,
preEvent
} = require("devtools/shared/protocol");
@ -15,7 +15,7 @@ const {
} = require("devtools/shared/specs/animation");
const { Task } = require("devtools/shared/task");
const AnimationPlayerFront = FrontClassWithSpec(animationPlayerSpec, {
const AnimationPlayerFront = FrontClass(animationPlayerSpec, {
initialize: function (conn, form, detail, ctx) {
Front.prototype.initialize.call(this, conn, form, detail, ctx);
@ -123,7 +123,7 @@ const AnimationPlayerFront = FrontClassWithSpec(animationPlayerSpec, {
exports.AnimationPlayerFront = AnimationPlayerFront;
const AnimationsFront = FrontClassWithSpec(animationsSpec, {
const AnimationsFront = FrontClass(animationsSpec, {
initialize: function (client, {animationsActor}) {
Front.prototype.initialize.call(this, client, {actor: animationsActor});
this.manage(this);

Просмотреть файл

@ -9,7 +9,7 @@ const protocol = require("devtools/shared/protocol");
/**
* The corresponding Front object for the FunctionCallActor.
*/
const FunctionCallFront = protocol.FrontClassWithSpec(functionCallSpec, {
const FunctionCallFront = protocol.FrontClass(functionCallSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client, form);
},
@ -38,7 +38,7 @@ exports.FunctionCallFront = FunctionCallFront;
*/
var CallWatcherFront =
exports.CallWatcherFront =
protocol.FrontClassWithSpec(callWatcherSpec, {
protocol.FrontClass(callWatcherSpec, {
initialize: function (client, { callWatcherActor }) {
protocol.Front.prototype.initialize.call(this, client, { actor: callWatcherActor });
this.manage(this);

Просмотреть файл

@ -18,7 +18,7 @@ const promise = require("promise");
/**
* The corresponding Front object for the FrameSnapshotActor.
*/
const FrameSnapshotFront = protocol.FrontClassWithSpec(frameSnapshotSpec, {
const FrameSnapshotFront = protocol.FrontClass(frameSnapshotSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client, form);
this._animationFrameEndScreenshot = null;
@ -64,7 +64,7 @@ exports.FrameSnapshotFront = FrameSnapshotFront;
/**
* The corresponding Front object for the CanvasActor.
*/
const CanvasFront = protocol.FrontClassWithSpec(canvasSpec, {
const CanvasFront = protocol.FrontClass(canvasSpec, {
initialize: function (client, { canvasActor }) {
protocol.Front.prototype.initialize.call(this, client, { actor: canvasActor });
this.manage(this);

Просмотреть файл

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { FrontClassWithSpec, Front } = require("devtools/shared/protocol");
const { FrontClass, Front } = require("devtools/shared/protocol");
const { cssPropertiesSpec } = require("devtools/shared/specs/css-properties");
const { Task } = require("devtools/shared/task");
const { CSS_PROPERTIES_DB } = require("devtools/shared/css-properties-db");
@ -39,7 +39,7 @@ var cachedCssProperties = new WeakMap();
* interface that provides synchronous methods for finding out what CSS
* properties the current server supports.
*/
const CssPropertiesFront = FrontClassWithSpec(cssPropertiesSpec, {
const CssPropertiesFront = FrontClass(cssPropertiesSpec, {
initialize: function (client, { cssPropertiesActor }) {
Front.prototype.initialize.call(this, client, {actor: cssPropertiesActor});
this.manage(this);

Просмотреть файл

@ -36,7 +36,7 @@ var chromeWindow;
/**
* Front for CSSUsageActor
*/
const CSSUsageFront = protocol.FrontClassWithSpec(cssUsageSpec, {
const CSSUsageFront = protocol.FrontClass(cssUsageSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client, form);
this.actorID = form.cssUsageActor;

Просмотреть файл

@ -8,7 +8,7 @@ const {deviceSpec} = require("devtools/shared/specs/device");
const protocol = require("devtools/shared/protocol");
const defer = require("devtools/shared/defer");
const DeviceFront = protocol.FrontClassWithSpec(deviceSpec, {
const DeviceFront = protocol.FrontClass(deviceSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client);
this.actorID = form.deviceActor;

Просмотреть файл

@ -13,7 +13,7 @@ const protocol = require("devtools/shared/protocol");
/**
* The corresponding Front object for the MessagePortActor.
*/
const MessagePortFront = protocol.FrontClassWithSpec(messagePortSpec, {
const MessagePortFront = protocol.FrontClass(messagePortSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client, form);
}
@ -24,7 +24,7 @@ exports.MessagePortFront = MessagePortFront;
/**
* The corresponding Front object for the DirectorScriptActor.
*/
const DirectorScriptFront = protocol.FrontClassWithSpec(directorScriptSpec, {
const DirectorScriptFront = protocol.FrontClass(directorScriptSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client, form);
}
@ -35,7 +35,7 @@ exports.DirectorScriptFront = DirectorScriptFront;
/**
* The corresponding Front object for the DirectorManagerActor.
*/
const DirectorManagerFront = protocol.FrontClassWithSpec(directorManagerSpec, {
const DirectorManagerFront = protocol.FrontClass(directorManagerSpec, {
initialize: function (client, { directorManagerActor }) {
protocol.Front.prototype.initialize.call(this, client, {
actor: directorManagerActor

Просмотреть файл

@ -9,7 +9,7 @@ const protocol = require("devtools/shared/protocol");
/**
* The corresponding Front object for the DirectorRegistryActor.
*/
const DirectorRegistryFront = protocol.FrontClassWithSpec(directorRegistrySpec, {
const DirectorRegistryFront = protocol.FrontClass(directorRegistrySpec, {
initialize: function (client, { directorRegistryActor }) {
protocol.Front.prototype.initialize.call(this, client, {
actor: directorRegistryActor

Просмотреть файл

@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
const { Front, FrontClass } = require("devtools/shared/protocol");
const { eventLoopLagSpec } = require("devtools/shared/specs/eventlooplag");
exports.EventLoopLagFront = FrontClassWithSpec(eventLoopLagSpec, {
exports.EventLoopLagFront = FrontClass(eventLoopLagSpec, {
initialize: function (client, form) {
Front.prototype.initialize.call(this, client);
this.actorID = form.eventLoopLagActor;

Просмотреть файл

@ -3,13 +3,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
const { Front, FrontClass } = require("devtools/shared/protocol");
const { framerateSpec } = require("devtools/shared/specs/framerate");
/**
* The corresponding Front object for the FramerateActor.
*/
var FramerateFront = exports.FramerateFront = FrontClassWithSpec(framerateSpec, {
var FramerateFront = exports.FramerateFront = FrontClass(framerateSpec, {
initialize: function (client, { framerateActor }) {
Front.prototype.initialize.call(this, client, { actor: framerateActor });
this.manage(this);

Просмотреть файл

@ -3,13 +3,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
const { Front, FrontClass } = require("devtools/shared/protocol");
const { gcliSpec } = require("devtools/shared/specs/gcli");
/**
*
*/
const GcliFront = exports.GcliFront = FrontClassWithSpec(gcliSpec, {
const GcliFront = exports.GcliFront = FrontClass(gcliSpec, {
initialize: function (client, tabForm) {
Front.prototype.initialize.call(this, client);
this.actorID = tabForm.gcliActor;

Просмотреть файл

@ -3,13 +3,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { FrontClassWithSpec } = require("devtools/shared/protocol");
const { FrontClass } = require("devtools/shared/protocol");
const {
customHighlighterSpec,
highlighterSpec
} = require("devtools/shared/specs/highlighters");
const HighlighterFront = FrontClassWithSpec(highlighterSpec, {
const HighlighterFront = FrontClass(highlighterSpec, {
// Update the object given a form representation off the wire.
form: function (json) {
this.actorID = json.actor;
@ -20,6 +20,6 @@ const HighlighterFront = FrontClassWithSpec(highlighterSpec, {
exports.HighlighterFront = HighlighterFront;
const CustomHighlighterFront = FrontClassWithSpec(customHighlighterSpec, {});
const CustomHighlighterFront = FrontClass(customHighlighterSpec, {});
exports.CustomHighlighterFront = CustomHighlighterFront;

Просмотреть файл

@ -8,7 +8,7 @@ require("devtools/shared/fronts/highlighters");
const { SimpleStringFront } = require("devtools/shared/fronts/string");
const {
Front,
FrontClassWithSpec,
FrontClass,
custom,
preEvent,
types
@ -84,7 +84,7 @@ const AttributeModificationList = Class({
* the parent node from clients, but the `children` request should be used
* to traverse children.
*/
const NodeFront = FrontClassWithSpec(nodeSpec, {
const NodeFront = FrontClass(nodeSpec, {
initialize: function (conn, form, detail, ctx) {
// The parent node
this._parent = null;
@ -444,7 +444,7 @@ exports.NodeFront = NodeFront;
/**
* Client side of a node list as returned by querySelectorAll()
*/
const NodeListFront = FrontClassWithSpec(nodeListSpec, {
const NodeListFront = FrontClass(nodeListSpec, {
initialize: function (client, form) {
Front.prototype.initialize.call(this, client, form);
},
@ -484,7 +484,7 @@ exports.NodeListFront = NodeListFront;
/**
* Client side of the DOM walker.
*/
const WalkerFront = FrontClassWithSpec(walkerSpec, {
const WalkerFront = FrontClass(walkerSpec, {
// Set to true if cleanup should be requested after every mutation list.
autoCleanup: true,
@ -940,7 +940,7 @@ exports.WalkerFront = WalkerFront;
* Client side of the inspector actor, which is used to create
* inspector-related actors, including the walker.
*/
var InspectorFront = FrontClassWithSpec(inspectorSpec, {
var InspectorFront = FrontClass(inspectorSpec, {
initialize: function (client, tabForm) {
Front.prototype.initialize.call(this, client);
this.actorID = tabForm.inspectorActor;

Просмотреть файл

@ -14,7 +14,7 @@ const protocol = require("devtools/shared/protocol");
* front.start();
* // now wait for events to come
*/
const ReflowFront = protocol.FrontClassWithSpec(reflowSpec, {
const ReflowFront = protocol.FrontClass(reflowSpec, {
initialize: function (client, {reflowActor}) {
protocol.Front.prototype.initialize.call(this, client, {actor: reflowActor});
this.manage(this);

Просмотреть файл

@ -12,7 +12,7 @@ loader.lazyRequireGetter(this, "FileUtils",
loader.lazyRequireGetter(this, "HeapSnapshotFileUtils",
"devtools/shared/heapsnapshot/HeapSnapshotFileUtils");
const MemoryFront = protocol.FrontClassWithSpec(memorySpec, {
const MemoryFront = protocol.FrontClass(memorySpec, {
initialize: function (client, form, rootForm = null) {
protocol.Front.prototype.initialize.call(this, client, form);
this._client = client;

Просмотреть файл

@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
const { Front, FrontClass } = require("devtools/shared/protocol");
const performanceSpec = require("devtools/shared/specs/performance-entries");
var PerformanceEntriesFront = FrontClassWithSpec(performanceSpec, {
var PerformanceEntriesFront = FrontClass(performanceSpec, {
initialize: function (client, form) {
Front.prototype.initialize.call(this, client);
this.actorID = form.performanceEntriesActor;

Просмотреть файл

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
const { Front, FrontClass } = require("devtools/shared/protocol");
const { performanceRecordingSpec } = require("devtools/shared/specs/performance-recording");
loader.lazyRequireGetter(this, "PerformanceIO",
@ -18,7 +18,7 @@ loader.lazyRequireGetter(this, "merge", "sdk/util/object", true);
* This can be used on older Profiler implementations, but the methods cannot
* be changed -- you must introduce a new method, and detect the server.
*/
const PerformanceRecordingFront = FrontClassWithSpec(performanceRecordingSpec, merge({
const PerformanceRecordingFront = FrontClass(performanceRecordingSpec, merge({
form: function (form, detail) {
if (detail === "actorid") {
this.actorID = form;

Просмотреть файл

@ -4,7 +4,7 @@
"use strict";
const { Cu } = require("chrome");
const { Front, FrontClassWithSpec, custom, preEvent } = require("devtools/shared/protocol");
const { Front, FrontClass, custom, preEvent } = require("devtools/shared/protocol");
const { PerformanceRecordingFront } = require("devtools/shared/fronts/performance-recording");
const { performanceSpec } = require("devtools/shared/specs/performance");
const { Task } = require("devtools/shared/task");
@ -16,7 +16,7 @@ loader.lazyRequireGetter(this, "LegacyPerformanceFront",
loader.lazyRequireGetter(this, "getSystemInfo",
"devtools/shared/system", true);
const PerformanceFront = FrontClassWithSpec(performanceSpec, {
const PerformanceFront = FrontClass(performanceSpec, {
initialize: function (client, form) {
Front.prototype.initialize.call(this, client, form);
this.actorID = form.performanceActor;

Просмотреть файл

@ -6,7 +6,7 @@
const {preferenceSpec} = require("devtools/shared/specs/preference");
const protocol = require("devtools/shared/protocol");
const PreferenceFront = protocol.FrontClassWithSpec(preferenceSpec, {
const PreferenceFront = protocol.FrontClass(preferenceSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client);
this.actorID = form.preferenceActor;

Просмотреть файл

@ -6,7 +6,7 @@
const { Cu } = require("chrome");
const {
Front,
FrontClassWithSpec,
FrontClass,
custom
} = require("devtools/shared/protocol");
const { profilerSpec } = require("devtools/shared/specs/profiler");
@ -18,7 +18,7 @@ loader.lazyRequireGetter(this, "extend", "sdk/util/object", true);
* This can be used on older Profiler implementations, but the methods cannot
* be changed -- you must introduce a new method, and detect the server.
*/
exports.ProfilerFront = FrontClassWithSpec(profilerSpec, {
exports.ProfilerFront = FrontClass(profilerSpec, {
initialize: function (client, form) {
Front.prototype.initialize.call(this, client, form);
this.actorID = form.profilerActor;

Просмотреть файл

@ -5,14 +5,14 @@
const {
Front,
FrontClassWithSpec,
FrontClass,
} = require("devtools/shared/protocol");
const { promisesSpec } = require("devtools/shared/specs/promises");
/**
* PromisesFront, the front for the PromisesActor.
*/
const PromisesFront = FrontClassWithSpec(promisesSpec, {
const PromisesFront = FrontClass(promisesSpec, {
initialize: function (client, form) {
Front.prototype.initialize.call(this, client, form);
this.actorID = form.promisesActor;

Просмотреть файл

@ -6,7 +6,7 @@
const {settingsSpec} = require("devtools/shared/specs/settings");
const protocol = require("devtools/shared/protocol");
const SettingsFront = protocol.FrontClassWithSpec(settingsSpec, {
const SettingsFront = protocol.FrontClass(settingsSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client);
this.actorID = form.settingsActor;

Просмотреть файл

@ -7,7 +7,7 @@ const protocol = require("devtools/shared/protocol");
const specs = require("devtools/shared/specs/storage");
for (let childSpec of Object.values(specs.childSpecs)) {
protocol.FrontClassWithSpec(childSpec, {
protocol.FrontClass(childSpec, {
form(form, detail) {
if (detail === "actorid") {
this.actorID = form;
@ -21,7 +21,7 @@ for (let childSpec of Object.values(specs.childSpecs)) {
});
}
const StorageFront = protocol.FrontClassWithSpec(specs.storageSpec, {
const StorageFront = protocol.FrontClass(specs.storageSpec, {
initialize(client, tabForm) {
protocol.Front.prototype.initialize.call(this, client);
this.actorID = tabForm.storageActor;

Просмотреть файл

@ -9,7 +9,7 @@ const {Class} = require("sdk/core/heritage");
const {longStringSpec} = require("devtools/shared/specs/string");
const protocol = require("devtools/shared/protocol");
const LongStringFront = protocol.FrontClassWithSpec(longStringSpec, {
const LongStringFront = protocol.FrontClass(longStringSpec, {
initialize: function (client) {
protocol.Front.prototype.initialize.call(this, client);
},

Просмотреть файл

@ -4,7 +4,7 @@
"use strict";
const { SimpleStringFront } = require("devtools/shared/fronts/string");
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
const { Front, FrontClass } = require("devtools/shared/protocol");
const {
oldStyleSheetSpec,
styleEditorSpec
@ -16,7 +16,7 @@ const events = require("sdk/event/core");
/**
* StyleSheetFront is the client-side counterpart to a StyleSheetActor.
*/
const OldStyleSheetFront = FrontClassWithSpec(oldStyleSheetSpec, {
const OldStyleSheetFront = FrontClass(oldStyleSheetSpec, {
initialize: function (conn, form, ctx, detail) {
Front.prototype.initialize.call(this, conn, form, ctx, detail);
@ -87,7 +87,7 @@ exports.OldStyleSheetFront = OldStyleSheetFront;
/**
* The corresponding Front object for the StyleEditorActor.
*/
const StyleEditorFront = FrontClassWithSpec(styleEditorSpec, {
const StyleEditorFront = FrontClass(styleEditorSpec, {
initialize: function (client, tabForm) {
Front.prototype.initialize.call(this, client);
this.actorID = tabForm.styleEditorActor;

Просмотреть файл

@ -6,7 +6,7 @@
require("devtools/shared/fronts/stylesheets");
const {
Front,
FrontClassWithSpec,
FrontClass,
custom,
preEvent
} = require("devtools/shared/protocol");
@ -25,7 +25,7 @@ loader.lazyGetter(this, "RuleRewriter", () => {
/**
* PageStyleFront, the front object for the PageStyleActor
*/
const PageStyleFront = FrontClassWithSpec(pageStyleSpec, {
const PageStyleFront = FrontClass(pageStyleSpec, {
initialize: function (conn, form, ctx, detail) {
Front.prototype.initialize.call(this, conn, form, ctx, detail);
this.inspector = this.parent();
@ -93,7 +93,7 @@ exports.PageStyleFront = PageStyleFront;
/**
* StyleRuleFront, the front for the StyleRule actor.
*/
const StyleRuleFront = FrontClassWithSpec(styleRuleSpec, {
const StyleRuleFront = FrontClass(styleRuleSpec, {
initialize: function (client, form, ctx, detail) {
Front.prototype.initialize.call(this, client, form, ctx, detail);
},

Просмотреть файл

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
const { Front, FrontClass } = require("devtools/shared/protocol");
const {
getIndentationFromPrefs,
getIndentationFromString
@ -21,7 +21,7 @@ const events = require("sdk/event/core");
/**
* The client-side counterpart for an OriginalSourceActor.
*/
const OriginalSourceFront = FrontClassWithSpec(originalSourceSpec, {
const OriginalSourceFront = FrontClass(originalSourceSpec, {
initialize: function (client, form) {
Front.prototype.initialize.call(this, client, form);
@ -50,7 +50,7 @@ exports.OriginalSourceFront = OriginalSourceFront;
/**
* Corresponding client-side front for a MediaRuleActor.
*/
const MediaRuleFront = FrontClassWithSpec(mediaRuleSpec, {
const MediaRuleFront = FrontClass(mediaRuleSpec, {
initialize: function (client, form) {
Front.prototype.initialize.call(this, client, form);
@ -96,7 +96,7 @@ exports.MediaRuleFront = MediaRuleFront;
/**
* StyleSheetFront is the client-side counterpart to a StyleSheetActor.
*/
const StyleSheetFront = FrontClassWithSpec(styleSheetSpec, {
const StyleSheetFront = FrontClass(styleSheetSpec, {
initialize: function (conn, form) {
Front.prototype.initialize.call(this, conn, form);
@ -173,7 +173,7 @@ exports.StyleSheetFront = StyleSheetFront;
/**
* The corresponding Front object for the StyleSheetsActor.
*/
const StyleSheetsFront = FrontClassWithSpec(styleSheetsSpec, {
const StyleSheetsFront = FrontClass(styleSheetsSpec, {
initialize: function (client, tabForm) {
Front.prototype.initialize.call(this, client);
this.actorID = tabForm.styleSheetsActor;

Просмотреть файл

@ -5,14 +5,14 @@
const {
Front,
FrontClassWithSpec,
FrontClass,
} = require("devtools/shared/protocol");
const { timelineSpec } = require("devtools/shared/specs/timeline");
/**
* TimelineFront, the front for the TimelineActor.
*/
const TimelineFront = FrontClassWithSpec(timelineSpec, {
const TimelineFront = FrontClass(timelineSpec, {
initialize: function (client, { timelineActor }) {
Front.prototype.initialize.call(this, client, { actor: timelineActor });
this.manage(this);

Просмотреть файл

@ -25,7 +25,7 @@ const AUDIO_NODE_DEFINITION = require("devtools/server/actors/utils/audionodes.j
* Boolean indicating if the audio node is bypassable (splitter,
* merger and destination nodes, for example, are not)
*/
const AudioNodeFront = protocol.FrontClassWithSpec(audionodeSpec, {
const AudioNodeFront = protocol.FrontClass(audionodeSpec, {
form: function (form, detail) {
if (detail === "actorid") {
this.actorID = form;
@ -53,7 +53,7 @@ exports.AudioNodeFront = AudioNodeFront;
/**
* The corresponding Front object for the WebAudioActor.
*/
const WebAudioFront = protocol.FrontClassWithSpec(webAudioSpec, {
const WebAudioFront = protocol.FrontClass(webAudioSpec, {
initialize: function (client, { webaudioActor }) {
protocol.Front.prototype.initialize.call(this, client, { actor: webaudioActor });
this.manage(this);

Просмотреть файл

@ -13,7 +13,7 @@ const protocol = require("devtools/shared/protocol");
/**
* The corresponding Front object for the ShaderActor.
*/
const ShaderFront = protocol.FrontClassWithSpec(shaderSpec, {
const ShaderFront = protocol.FrontClass(shaderSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client, form);
}
@ -24,7 +24,7 @@ exports.ShaderFront = ShaderFront;
/**
* The corresponding Front object for the ProgramActor.
*/
const ProgramFront = protocol.FrontClassWithSpec(programSpec, {
const ProgramFront = protocol.FrontClass(programSpec, {
initialize: function (client, form) {
protocol.Front.prototype.initialize.call(this, client, form);
}
@ -35,7 +35,7 @@ exports.ProgramFront = ProgramFront;
/**
* The corresponding Front object for the WebGLActor.
*/
const WebGLFront = protocol.FrontClassWithSpec(webGLSpec, {
const WebGLFront = protocol.FrontClass(webGLSpec, {
initialize: function (client, { webglActor }) {
protocol.Front.prototype.initialize.call(this, client, { actor: webglActor });
this.manage(this);

Просмотреть файл

@ -1099,7 +1099,7 @@ var generateRequestHandlers = function (actorSpec, actorProto) {
* The actor prototype. Should have method definitions, can have event
* definitions.
*/
var ActorClassWithSpec = function (actorSpec, actorProto) {
var ActorClass = function (actorSpec, actorProto) {
if (!actorSpec.typeName) {
throw Error("Actor specification must have a typeName member.");
}
@ -1109,7 +1109,7 @@ var ActorClassWithSpec = function (actorSpec, actorProto) {
return cls;
};
exports.ActorClassWithSpec = ActorClassWithSpec;
exports.ActorClass = ActorClass;
/**
* Base class for client-side actor fronts.
@ -1420,7 +1420,7 @@ var generateRequestMethods = function (actorSpec, frontProto) {
* The object prototype. Must have a 'typeName' property,
* should have method definitions, can have event definitions.
*/
var FrontClassWithSpec = function (actorSpec, frontProto) {
var FrontClass = function (actorSpec, frontProto) {
frontProto.extends = Front;
let cls = Class(generateRequestMethods(actorSpec, frontProto));
@ -1431,7 +1431,7 @@ var FrontClassWithSpec = function (actorSpec, frontProto) {
return cls;
};
exports.FrontClassWithSpec = FrontClassWithSpec;
exports.FrontClass = FrontClass;
exports.dumpActorSpec = function (type) {
let actorSpec = type.actorSpec;