Bug 1295171 - Reintroduce the old Actor/FrontClass constructors. r=jryans
Heintroduce the old Actor/FrontClass constructors.
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
// by NodeActor actor (see 'onNodeActorForm' method).
|
// by NodeActor actor (see 'onNodeActorForm' method).
|
||||||
|
|
||||||
const Events = require("sdk/event/core");
|
const Events = require("sdk/event/core");
|
||||||
const {ActorClass, Actor, FrontClass, Front, generateActorSpec} =
|
const {ActorClassWithSpec, Actor, FrontClassWithSpec, Front, generateActorSpec} =
|
||||||
require("devtools/shared/protocol");
|
require("devtools/shared/protocol");
|
||||||
|
|
||||||
const {NodeActor} = require("devtools/server/actors/inspector");
|
const {NodeActor} = require("devtools/server/actors/inspector");
|
||||||
@@ -28,7 +28,7 @@ var eventsSpec = generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var EventsFormActor = ActorClass(eventsSpec, {
|
var EventsFormActor = ActorClassWithSpec(eventsSpec, {
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
Actor.prototype.initialize.apply(this, arguments);
|
Actor.prototype.initialize.apply(this, arguments);
|
||||||
},
|
},
|
||||||
@@ -50,7 +50,7 @@ var EventsFormActor = ActorClass(eventsSpec, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var EventsFormFront = FrontClass(eventsSpec, {
|
var EventsFormFront = FrontClassWithSpec(eventsSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.apply(this, arguments);
|
Front.prototype.initialize.apply(this, arguments);
|
||||||
|
|
||||||
|
|||||||
@@ -470,8 +470,8 @@ function createTestHTTPServer() {
|
|||||||
*
|
*
|
||||||
* - moduleUrl {String}: URL of the module that contains actor implementation.
|
* - moduleUrl {String}: URL of the module that contains actor implementation.
|
||||||
* - prefix {String}: prefix of the actor.
|
* - prefix {String}: prefix of the actor.
|
||||||
* - actorClass {ActorClass}: Constructor object for the actor.
|
* - actorClass {ActorClassWithSpec}: Constructor object for the actor.
|
||||||
* - frontClass {FrontClass}: Constructor object for the front part
|
* - frontClass {FrontClassWithSpec}: Constructor object for the front part
|
||||||
* of the registered actor.
|
* of the registered actor.
|
||||||
*
|
*
|
||||||
* @returns {Promise} A promise that is resolved when the actor is registered.
|
* @returns {Promise} A promise that is resolved when the actor is registered.
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ var testSpec = protocol.generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var TestActor = exports.TestActor = protocol.ActorClass(testSpec, {
|
var TestActor = exports.TestActor = protocol.ActorClassWithSpec(testSpec, {
|
||||||
initialize: function (conn, tabActor, options) {
|
initialize: function (conn, tabActor, options) {
|
||||||
this.conn = conn;
|
this.conn = conn;
|
||||||
this.tabActor = tabActor;
|
this.tabActor = tabActor;
|
||||||
@@ -728,7 +728,7 @@ var TestActor = exports.TestActor = protocol.ActorClass(testSpec, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var TestActorFront = exports.TestActorFront = protocol.FrontClass(testSpec, {
|
var TestActorFront = exports.TestActorFront = protocol.FrontClassWithSpec(testSpec, {
|
||||||
initialize: function (client, { testActor }, toolbox) {
|
initialize: function (client, { testActor }, toolbox) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, { actor: testActor });
|
protocol.Front.prototype.initialize.call(this, client, { actor: testActor });
|
||||||
this.manage(this);
|
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
|
* The ActorActor gives you a handle to an actor you've dynamically
|
||||||
* registered and allows you to unregister it.
|
* registered and allows you to unregister it.
|
||||||
*/
|
*/
|
||||||
const ActorActor = protocol.ActorClass(actorActorSpec, {
|
const ActorActor = protocol.ActorClassWithSpec(actorActorSpec, {
|
||||||
initialize: function (conn, options) {
|
initialize: function (conn, options) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ const ActorActor = protocol.ActorClass(actorActorSpec, {
|
|||||||
* The ActorRegistryActor allows clients to define new actors on the
|
* The ActorRegistryActor allows clients to define new actors on the
|
||||||
* server. This is particularly useful for addons.
|
* server. This is particularly useful for addons.
|
||||||
*/
|
*/
|
||||||
const ActorRegistryActor = protocol.ActorClass(actorRegistrySpec, {
|
const ActorRegistryActor = protocol.ActorClassWithSpec(actorRegistrySpec, {
|
||||||
initialize: function (conn) {
|
initialize: function (conn) {
|
||||||
protocol.Actor.prototype.initialize.call(this, 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 {Task} = require("devtools/shared/task");
|
||||||
const {addonsSpec} = require("devtools/shared/specs/addons");
|
const {addonsSpec} = require("devtools/shared/specs/addons");
|
||||||
|
|
||||||
const AddonsActor = protocol.ActorClass(addonsSpec, {
|
const AddonsActor = protocol.ActorClassWithSpec(addonsSpec, {
|
||||||
|
|
||||||
initialize: function (conn) {
|
initialize: function (conn) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const {Cu} = require("chrome");
|
|||||||
const promise = require("promise");
|
const promise = require("promise");
|
||||||
const {Task} = require("devtools/shared/task");
|
const {Task} = require("devtools/shared/task");
|
||||||
const protocol = require("devtools/shared/protocol");
|
const protocol = require("devtools/shared/protocol");
|
||||||
const {Actor, ActorClass} = protocol;
|
const {Actor, ActorClassWithSpec} = protocol;
|
||||||
const {animationPlayerSpec, animationsSpec} = require("devtools/shared/specs/animation");
|
const {animationPlayerSpec, animationsSpec} = require("devtools/shared/specs/animation");
|
||||||
const events = require("sdk/event/core");
|
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.
|
* This actor also allows playing, pausing and seeking the animation.
|
||||||
*/
|
*/
|
||||||
var AnimationPlayerActor = protocol.ActorClass(animationPlayerSpec, {
|
var AnimationPlayerActor = protocol.ActorClassWithSpec(animationPlayerSpec, {
|
||||||
/**
|
/**
|
||||||
* @param {AnimationsActor} The main AnimationsActor instance
|
* @param {AnimationsActor} The main AnimationsActor instance
|
||||||
* @param {AnimationPlayer} The player object returned by getAnimationPlayers
|
* @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.
|
* The Animations actor lists animation players for a given node.
|
||||||
*/
|
*/
|
||||||
var AnimationsActor = exports.AnimationsActor = protocol.ActorClass(animationsSpec, {
|
var AnimationsActor = exports.AnimationsActor = protocol.ActorClassWithSpec(animationsSpec, {
|
||||||
initialize: function(conn, tabActor) {
|
initialize: function(conn, tabActor) {
|
||||||
Actor.prototype.initialize.call(this, conn);
|
Actor.prototype.initialize.call(this, conn);
|
||||||
this.tabActor = tabActor;
|
this.tabActor = tabActor;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { ActorClass } = require("devtools/shared/protocol");
|
const { ActorClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { breakpointSpec } = require("devtools/shared/specs/breakpoint");
|
const { breakpointSpec } = require("devtools/shared/specs/breakpoint");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,7 +34,7 @@ exports.setBreakpointAtEntryPoints = setBreakpointAtEntryPoints;
|
|||||||
* responsible for deleting breakpoints, handling breakpoint hits and
|
* responsible for deleting breakpoints, handling breakpoint hits and
|
||||||
* associating breakpoints with scripts.
|
* associating breakpoints with scripts.
|
||||||
*/
|
*/
|
||||||
let BreakpointActor = ActorClass(breakpointSpec, {
|
let BreakpointActor = ActorClassWithSpec(breakpointSpec, {
|
||||||
/**
|
/**
|
||||||
* Create a Breakpoint actor.
|
* 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
|
* This actor contains information about a function call, like the function
|
||||||
* type, name, stack, arguments, returned value etc.
|
* type, name, stack, arguments, returned value etc.
|
||||||
*/
|
*/
|
||||||
var FunctionCallActor = protocol.ActorClass(functionCallSpec, {
|
var FunctionCallActor = protocol.ActorClassWithSpec(functionCallSpec, {
|
||||||
/**
|
/**
|
||||||
* Creates the function call actor.
|
* Creates the function call actor.
|
||||||
*
|
*
|
||||||
@@ -226,7 +226,7 @@ var FunctionCallActor = protocol.ActorClass(functionCallSpec, {
|
|||||||
/**
|
/**
|
||||||
* This actor observes function calls on certain objects or globals.
|
* This actor observes function calls on certain objects or globals.
|
||||||
*/
|
*/
|
||||||
var CallWatcherActor = exports.CallWatcherActor = protocol.ActorClass(callWatcherSpec, {
|
var CallWatcherActor = exports.CallWatcherActor = protocol.ActorClassWithSpec(callWatcherSpec, {
|
||||||
initialize: function (conn, tabActor) {
|
initialize: function (conn, tabActor) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
this.tabActor = tabActor;
|
this.tabActor = tabActor;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const {method, custom, Arg, Option, RetVal} = protocol;
|
|||||||
* all the corresponding canvas' context methods invoked in that frame,
|
* all the corresponding canvas' context methods invoked in that frame,
|
||||||
* thumbnails for each draw call and a screenshot of the end result.
|
* thumbnails for each draw call and a screenshot of the end result.
|
||||||
*/
|
*/
|
||||||
var FrameSnapshotActor = protocol.ActorClass(frameSnapshotSpec, {
|
var FrameSnapshotActor = protocol.ActorClassWithSpec(frameSnapshotSpec, {
|
||||||
/**
|
/**
|
||||||
* Creates the frame snapshot call actor.
|
* Creates the frame snapshot call actor.
|
||||||
*
|
*
|
||||||
@@ -120,7 +120,7 @@ var FrameSnapshotActor = protocol.ActorClass(frameSnapshotSpec, {
|
|||||||
* of a 2D or WebGL context, to provide information regarding all the calls
|
* of a 2D or WebGL context, to provide information regarding all the calls
|
||||||
* made when drawing frame inside an animation loop.
|
* made when drawing frame inside an animation loop.
|
||||||
*/
|
*/
|
||||||
var CanvasActor = exports.CanvasActor = protocol.ActorClass(canvasSpec, {
|
var CanvasActor = exports.CanvasActor = protocol.ActorClassWithSpec(canvasSpec, {
|
||||||
// Reset for each recording, boolean indicating whether or not
|
// Reset for each recording, boolean indicating whether or not
|
||||||
// any draw calls were called for a recording.
|
// any draw calls were called for a recording.
|
||||||
_animationContainsDrawCall: false,
|
_animationContainsDrawCall: false,
|
||||||
|
|||||||
@@ -511,7 +511,7 @@ exports.actorBridge = actorBridge;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Like `actorBridge`, but without a spec definition, for when the actor is
|
* Like `actorBridge`, but without a spec definition, for when the actor is
|
||||||
* created with `ActorClass` rather than vanilla `ActorClass`.
|
* created with `ActorClassWithSpec` rather than vanilla `ActorClass`.
|
||||||
*/
|
*/
|
||||||
function actorBridgeWithSpec (methodName) {
|
function actorBridgeWithSpec (methodName) {
|
||||||
return method(function () {
|
return method(function () {
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ loader.lazyGetter(this, "appInfo", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const protocol = require("devtools/shared/protocol");
|
const protocol = require("devtools/shared/protocol");
|
||||||
const { ActorClass, Actor } = protocol;
|
const { ActorClassWithSpec, Actor } = protocol;
|
||||||
const { cssPropertiesSpec } = require("devtools/shared/specs/css-properties");
|
const { cssPropertiesSpec } = require("devtools/shared/specs/css-properties");
|
||||||
const { CSS_PROPERTIES, CSS_TYPES } = require("devtools/shared/css-properties-db");
|
const { CSS_PROPERTIES, CSS_TYPES } = require("devtools/shared/css-properties-db");
|
||||||
const { cssColors } = require("devtools/shared/css-color-db");
|
const { cssColors } = require("devtools/shared/css-color-db");
|
||||||
|
|
||||||
exports.CssPropertiesActor = ActorClass(cssPropertiesSpec, {
|
exports.CssPropertiesActor = ActorClassWithSpec(cssPropertiesSpec, {
|
||||||
typeName: "cssProperties",
|
typeName: "cssProperties",
|
||||||
|
|
||||||
initialize(conn, parent) {
|
initialize(conn, parent) {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ const l10n = exports.l10n = {
|
|||||||
* }, ...
|
* }, ...
|
||||||
* });
|
* });
|
||||||
*/
|
*/
|
||||||
var CSSUsageActor = protocol.ActorClass(cssUsageSpec, {
|
var CSSUsageActor = protocol.ActorClassWithSpec(cssUsageSpec, {
|
||||||
initialize: function (conn, tabActor) {
|
initialize: function (conn, tabActor) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const {deviceSpec} = require("devtools/shared/specs/device");
|
|||||||
const FileReader = require("FileReader");
|
const FileReader = require("FileReader");
|
||||||
const {PermissionsTable} = require("resource://gre/modules/PermissionsTable.jsm");
|
const {PermissionsTable} = require("resource://gre/modules/PermissionsTable.jsm");
|
||||||
|
|
||||||
var DeviceActor = exports.DeviceActor = protocol.ActorClass(deviceSpec, {
|
var DeviceActor = exports.DeviceActor = protocol.ActorClassWithSpec(deviceSpec, {
|
||||||
_desc: null,
|
_desc: null,
|
||||||
|
|
||||||
getDescription: function () {
|
getDescription: function () {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const ERR_DIRECTOR_UNINSTALLED_SCRIPTID = "uninstalled director-script id";
|
|||||||
* A MessagePort Actor allowing communication through messageport events
|
* A MessagePort Actor allowing communication through messageport events
|
||||||
* over the remote debugging protocol.
|
* over the remote debugging protocol.
|
||||||
*/
|
*/
|
||||||
var MessagePortActor = exports.MessagePortActor = protocol.ActorClass(messagePortSpec, {
|
var MessagePortActor = exports.MessagePortActor = protocol.ActorClassWithSpec(messagePortSpec, {
|
||||||
/**
|
/**
|
||||||
* Create a MessagePort actor.
|
* Create a MessagePort actor.
|
||||||
*
|
*
|
||||||
@@ -149,7 +149,7 @@ var MessagePortActor = exports.MessagePortActor = protocol.ActorClass(messagePor
|
|||||||
* directly connect the debugger client and the content script using a MessageChannel) on tab
|
* directly connect the debugger client and the content script using a MessageChannel) on tab
|
||||||
* navigation.
|
* navigation.
|
||||||
*/
|
*/
|
||||||
var DirectorScriptActor = exports.DirectorScriptActor = protocol.ActorClass(directorScriptSpec, {
|
var DirectorScriptActor = exports.DirectorScriptActor = protocol.ActorClassWithSpec(directorScriptSpec, {
|
||||||
/**
|
/**
|
||||||
* Creates the director script actor
|
* Creates the director script actor
|
||||||
*
|
*
|
||||||
@@ -337,7 +337,7 @@ var DirectorScriptActor = exports.DirectorScriptActor = protocol.ActorClass(dire
|
|||||||
/**
|
/**
|
||||||
* The DirectorManager Actor is a tab actor which manages enabling/disabling director scripts.
|
* The DirectorManager Actor is a tab actor which manages enabling/disabling director scripts.
|
||||||
*/
|
*/
|
||||||
const DirectorManagerActor = exports.DirectorManagerActor = protocol.ActorClass(directorManagerSpec, {
|
const DirectorManagerActor = exports.DirectorManagerActor = protocol.ActorClassWithSpec(directorManagerSpec, {
|
||||||
/* init & destroy methods */
|
/* init & destroy methods */
|
||||||
initialize: function (conn, tabActor) {
|
initialize: function (conn, tabActor) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ exports.setupParentProcess = function setupParentProcess({ mm, prefix }) {
|
|||||||
* The DirectorRegistry Actor is a global actor which manages install/uninstall of
|
* The DirectorRegistry Actor is a global actor which manages install/uninstall of
|
||||||
* director scripts definitions.
|
* director scripts definitions.
|
||||||
*/
|
*/
|
||||||
const DirectorRegistryActor = exports.DirectorRegistryActor = protocol.ActorClass(directorRegistrySpec, {
|
const DirectorRegistryActor = exports.DirectorRegistryActor = protocol.ActorClassWithSpec(directorRegistrySpec, {
|
||||||
/* init & destroy methods */
|
/* init & destroy methods */
|
||||||
initialize: function (conn, parentActor) {
|
initialize: function (conn, parentActor) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const protocol = require("devtools/shared/protocol");
|
|||||||
const { emulationSpec } = require("devtools/shared/specs/emulation");
|
const { emulationSpec } = require("devtools/shared/specs/emulation");
|
||||||
const { SimulatorCore } = require("devtools/shared/touch/simulator-core");
|
const { SimulatorCore } = require("devtools/shared/touch/simulator-core");
|
||||||
|
|
||||||
let EmulationActor = protocol.ActorClass(emulationSpec, {
|
let EmulationActor = protocol.ActorClassWithSpec(emulationSpec, {
|
||||||
initialize(conn, tabActor) {
|
initialize(conn, tabActor) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
this.docShell = tabActor.docShell;
|
this.docShell = tabActor.docShell;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { ActorClass } = require("devtools/shared/protocol");
|
const { ActorClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { createValueGrip } = require("devtools/server/actors/object");
|
const { createValueGrip } = require("devtools/server/actors/object");
|
||||||
const { environmentSpec } = require("devtools/shared/specs/environment");
|
const { environmentSpec } = require("devtools/shared/specs/environment");
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ const { environmentSpec } = require("devtools/shared/specs/environment");
|
|||||||
* @param ThreadActor aThreadActor
|
* @param ThreadActor aThreadActor
|
||||||
* The parent thread actor that contains this environment.
|
* The parent thread actor that contains this environment.
|
||||||
*/
|
*/
|
||||||
let EnvironmentActor = ActorClass(environmentSpec, {
|
let EnvironmentActor = ActorClassWithSpec(environmentSpec, {
|
||||||
initialize: function (environment, threadActor) {
|
initialize: function (environment, threadActor) {
|
||||||
this.obj = environment;
|
this.obj = environment;
|
||||||
this.threadActor = threadActor;
|
this.threadActor = threadActor;
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
const {Ci} = require("chrome");
|
const {Ci} = require("chrome");
|
||||||
const Services = require("Services");
|
const Services = require("Services");
|
||||||
const {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");
|
const {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
const {Actor, ActorClass} = require("devtools/shared/protocol");
|
const {Actor, ActorClassWithSpec} = require("devtools/shared/protocol");
|
||||||
const events = require("sdk/event/core");
|
const events = require("sdk/event/core");
|
||||||
const {eventLoopLagSpec} = require("devtools/shared/specs/eventlooplag");
|
const {eventLoopLagSpec} = require("devtools/shared/specs/eventlooplag");
|
||||||
|
|
||||||
var EventLoopLagActor = exports.EventLoopLagActor = ActorClass(eventLoopLagSpec, {
|
var EventLoopLagActor = exports.EventLoopLagActor = ActorClassWithSpec(eventLoopLagSpec, {
|
||||||
_observerAdded: false,
|
_observerAdded: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,13 +8,13 @@
|
|||||||
|
|
||||||
const { ActorPool } = require("devtools/server/actors/common");
|
const { ActorPool } = require("devtools/server/actors/common");
|
||||||
const { createValueGrip } = require("devtools/server/actors/object");
|
const { createValueGrip } = require("devtools/server/actors/object");
|
||||||
const { ActorClass } = require("devtools/shared/protocol");
|
const { ActorClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { frameSpec } = require("devtools/shared/specs/frame");
|
const { frameSpec } = require("devtools/shared/specs/frame");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An actor for a specified stack frame.
|
* An actor for a specified stack frame.
|
||||||
*/
|
*/
|
||||||
let FrameActor = ActorClass(frameSpec, {
|
let FrameActor = ActorClassWithSpec(frameSpec, {
|
||||||
/**
|
/**
|
||||||
* Creates the Frame actor.
|
* Creates the Frame actor.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Actor, ActorClass } = require("devtools/shared/protocol");
|
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
|
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
|
||||||
const { on, once, off, emit } = require("sdk/event/core");
|
const { on, once, off, emit } = require("sdk/event/core");
|
||||||
const { Framerate } = require("devtools/server/performance/framerate");
|
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.
|
* @see devtools/server/performance/framerate.js for documentation.
|
||||||
*/
|
*/
|
||||||
var FramerateActor = exports.FramerateActor = ActorClass(framerateSpec, {
|
var FramerateActor = exports.FramerateActor = ActorClassWithSpec(framerateSpec, {
|
||||||
initialize: function (conn, tabActor) {
|
initialize: function (conn, tabActor) {
|
||||||
Actor.prototype.initialize.call(this, conn);
|
Actor.prototype.initialize.call(this, conn);
|
||||||
this.bridge = new Framerate(tabActor);
|
this.bridge = new Framerate(tabActor);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
const { Task } = require("devtools/shared/task");
|
const { Task } = require("devtools/shared/task");
|
||||||
const {
|
const {
|
||||||
method, Arg, Option, RetVal, Actor, ActorClass
|
method, Arg, Option, RetVal, Actor, ActorClassWithSpec
|
||||||
} = require("devtools/shared/protocol");
|
} = require("devtools/shared/protocol");
|
||||||
const { gcliSpec } = require("devtools/shared/specs/gcli");
|
const { gcliSpec } = require("devtools/shared/specs/gcli");
|
||||||
const events = require("sdk/event/core");
|
const events = require("sdk/event/core");
|
||||||
@@ -15,7 +15,7 @@ const { createSystem } = require("gcli/system");
|
|||||||
/**
|
/**
|
||||||
* Manage remote connections that want to talk to GCLI
|
* Manage remote connections that want to talk to GCLI
|
||||||
*/
|
*/
|
||||||
const GcliActor = ActorClass(gcliSpec, {
|
const GcliActor = ActorClassWithSpec(gcliSpec, {
|
||||||
initialize: function (conn, tabActor) {
|
initialize: function (conn, tabActor) {
|
||||||
Actor.prototype.initialize.call(this, conn);
|
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
|
* because child processes are sandboxed and do not have access to the file
|
||||||
* system.
|
* system.
|
||||||
*/
|
*/
|
||||||
exports.HeapSnapshotFileActor = protocol.ActorClass(heapSnapshotFileSpec, {
|
exports.HeapSnapshotFileActor = protocol.ActorClassWithSpec(heapSnapshotFileSpec, {
|
||||||
initialize: function (conn, parent) {
|
initialize: function (conn, parent) {
|
||||||
if (Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT) {
|
if (Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT) {
|
||||||
const err = new Error("Attempt to create a HeapSnapshotFileActor in a " +
|
const err = new Error("Attempt to create a HeapSnapshotFileActor in a " +
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ exports.register = register;
|
|||||||
/**
|
/**
|
||||||
* The HighlighterActor class
|
* The HighlighterActor class
|
||||||
*/
|
*/
|
||||||
var HighlighterActor = exports.HighlighterActor = protocol.ActorClass(highlighterSpec, {
|
var HighlighterActor = exports.HighlighterActor = protocol.ActorClassWithSpec(highlighterSpec, {
|
||||||
initialize: function (inspector, autohide) {
|
initialize: function (inspector, autohide) {
|
||||||
protocol.Actor.prototype.initialize.call(this, null);
|
protocol.Actor.prototype.initialize.call(this, null);
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ var HighlighterActor = exports.HighlighterActor = protocol.ActorClass(highlighte
|
|||||||
* A generic highlighter actor class that instantiate a highlighter given its
|
* A generic highlighter actor class that instantiate a highlighter given its
|
||||||
* type name and allows to show/hide it.
|
* type name and allows to show/hide it.
|
||||||
*/
|
*/
|
||||||
var CustomHighlighterActor = exports.CustomHighlighterActor = protocol.ActorClass(customHighlighterSpec, {
|
var CustomHighlighterActor = exports.CustomHighlighterActor = protocol.ActorClassWithSpec(customHighlighterSpec, {
|
||||||
/**
|
/**
|
||||||
* Create a highlighter instance given its typename
|
* Create a highlighter instance given its typename
|
||||||
* The typename must be one of HIGHLIGHTER_CLASSES and the class must
|
* 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.
|
* Server side of the node actor.
|
||||||
*/
|
*/
|
||||||
var NodeActor = exports.NodeActor = protocol.ActorClass(nodeSpec, {
|
var NodeActor = exports.NodeActor = protocol.ActorClassWithSpec(nodeSpec, {
|
||||||
initialize: function (walker, node) {
|
initialize: function (walker, node) {
|
||||||
protocol.Actor.prototype.initialize.call(this, null);
|
protocol.Actor.prototype.initialize.call(this, null);
|
||||||
this.walker = walker;
|
this.walker = walker;
|
||||||
@@ -708,7 +708,7 @@ var NodeActor = exports.NodeActor = protocol.ActorClass(nodeSpec, {
|
|||||||
/**
|
/**
|
||||||
* Server side of a node list as returned by querySelectorAll()
|
* Server side of a node list as returned by querySelectorAll()
|
||||||
*/
|
*/
|
||||||
var NodeListActor = exports.NodeListActor = protocol.ActorClass(nodeListSpec, {
|
var NodeListActor = exports.NodeListActor = protocol.ActorClassWithSpec(nodeListSpec, {
|
||||||
typeName: "domnodelist",
|
typeName: "domnodelist",
|
||||||
|
|
||||||
initialize: function (walker, nodeList) {
|
initialize: function (walker, nodeList) {
|
||||||
@@ -766,7 +766,7 @@ var NodeListActor = exports.NodeListActor = protocol.ActorClass(nodeListSpec, {
|
|||||||
/**
|
/**
|
||||||
* Server side of the DOM walker.
|
* Server side of the DOM walker.
|
||||||
*/
|
*/
|
||||||
var WalkerActor = protocol.ActorClass(walkerSpec, {
|
var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
|
||||||
/**
|
/**
|
||||||
* Create the WalkerActor
|
* Create the WalkerActor
|
||||||
* @param DebuggerServerConnection conn
|
* @param DebuggerServerConnection conn
|
||||||
@@ -2578,7 +2578,7 @@ var WalkerActor = protocol.ActorClass(walkerSpec, {
|
|||||||
* Server side of the inspector actor, which is used to create
|
* Server side of the inspector actor, which is used to create
|
||||||
* inspector-related actors, including the walker.
|
* inspector-related actors, including the walker.
|
||||||
*/
|
*/
|
||||||
exports.InspectorActor = protocol.ActorClass(inspectorSpec, {
|
exports.InspectorActor = protocol.ActorClassWithSpec(inspectorSpec, {
|
||||||
initialize: function (conn, tabActor) {
|
initialize: function (conn, tabActor) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
this.tabActor = tabActor;
|
this.tabActor = tabActor;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const {reflowSpec} = require("devtools/shared/specs/layout");
|
|||||||
/**
|
/**
|
||||||
* The reflow actor tracks reflows and emits events about them.
|
* The reflow actor tracks reflows and emits events about them.
|
||||||
*/
|
*/
|
||||||
var ReflowActor = exports.ReflowActor = protocol.ActorClass(reflowSpec, {
|
var ReflowActor = exports.ReflowActor = protocol.ActorClassWithSpec(reflowSpec, {
|
||||||
initialize: function (conn, tabActor) {
|
initialize: function (conn, tabActor) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ loader.lazyRequireGetter(this, "StackFrameCache",
|
|||||||
*
|
*
|
||||||
* @see devtools/server/performance/memory.js for documentation.
|
* @see devtools/server/performance/memory.js for documentation.
|
||||||
*/
|
*/
|
||||||
exports.MemoryActor = protocol.ActorClass(memorySpec, {
|
exports.MemoryActor = protocol.ActorClassWithSpec(memorySpec, {
|
||||||
initialize: function (conn, parent, frameCache = new StackFrameCache()) {
|
initialize: function (conn, parent, frameCache = new StackFrameCache()) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
* epoch of the performance entry.
|
* epoch of the performance entry.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { Actor, ActorClass } = require("devtools/shared/protocol");
|
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const performanceSpec = require("devtools/shared/specs/performance-entries");
|
const performanceSpec = require("devtools/shared/specs/performance-entries");
|
||||||
const events = require("sdk/event/core");
|
const events = require("sdk/event/core");
|
||||||
|
|
||||||
var PerformanceEntriesActor = ActorClass(performanceSpec, {
|
var PerformanceEntriesActor = ActorClassWithSpec(performanceSpec, {
|
||||||
listenerAdded: false,
|
listenerAdded: false,
|
||||||
|
|
||||||
initialize: function (conn, tabActor) {
|
initialize: function (conn, tabActor) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Cu } = require("chrome");
|
const { Cu } = require("chrome");
|
||||||
const { Actor, ActorClass } = require("devtools/shared/protocol");
|
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { performanceRecordingSpec } = require("devtools/shared/specs/performance-recording");
|
const { performanceRecordingSpec } = require("devtools/shared/specs/performance-recording");
|
||||||
|
|
||||||
loader.lazyRequireGetter(this, "merge", "sdk/util/object", true);
|
loader.lazyRequireGetter(this, "merge", "sdk/util/object", true);
|
||||||
@@ -20,7 +20,7 @@ loader.lazyRequireGetter(this, "PerformanceRecordingCommon",
|
|||||||
*
|
*
|
||||||
* @see devtools/shared/shared/performance.js for documentation.
|
* @see devtools/shared/shared/performance.js for documentation.
|
||||||
*/
|
*/
|
||||||
const PerformanceRecordingActor = ActorClass(performanceRecordingSpec, merge({
|
const PerformanceRecordingActor = ActorClassWithSpec(performanceRecordingSpec, merge({
|
||||||
form: function (detail) {
|
form: function (detail) {
|
||||||
if (detail === "actorid") {
|
if (detail === "actorid") {
|
||||||
return this.actorID;
|
return this.actorID;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
const { Cu } = require("chrome");
|
const { Cu } = require("chrome");
|
||||||
const { Task } = require("devtools/shared/task");
|
const { Task } = require("devtools/shared/task");
|
||||||
const { Actor, ActorClass } = require("devtools/shared/protocol");
|
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
|
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
|
||||||
const { performanceSpec } = require("devtools/shared/specs/performance");
|
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.
|
* @see devtools/shared/shared/performance.js for documentation.
|
||||||
*/
|
*/
|
||||||
var PerformanceActor = ActorClass(performanceSpec, {
|
var PerformanceActor = ActorClassWithSpec(performanceSpec, {
|
||||||
traits: {
|
traits: {
|
||||||
features: {
|
features: {
|
||||||
withMarkers: true,
|
withMarkers: true,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ exports.register = function (handle) {
|
|||||||
exports.unregister = function (handle) {
|
exports.unregister = function (handle) {
|
||||||
};
|
};
|
||||||
|
|
||||||
var PreferenceActor = exports.PreferenceActor = protocol.ActorClass(preferenceSpec, {
|
var PreferenceActor = exports.PreferenceActor = protocol.ActorClassWithSpec(preferenceSpec, {
|
||||||
typeName: "preference",
|
typeName: "preference",
|
||||||
|
|
||||||
getBoolPref: function (name) {
|
getBoolPref: function (name) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Actor, ActorClass } = require("devtools/shared/protocol");
|
const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { Profiler } = require("devtools/server/performance/profiler");
|
const { Profiler } = require("devtools/server/performance/profiler");
|
||||||
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
|
const { actorBridgeWithSpec } = require("devtools/server/actors/common");
|
||||||
const { profilerSpec } = require("devtools/shared/specs/profiler");
|
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.
|
* @see devtools/server/performance/profiler.js for documentation.
|
||||||
*/
|
*/
|
||||||
var ProfilerActor = exports.ProfilerActor = ActorClass(profilerSpec, {
|
var ProfilerActor = exports.ProfilerActor = ActorClassWithSpec(profilerSpec, {
|
||||||
initialize: function (conn) {
|
initialize: function (conn) {
|
||||||
Actor.prototype.initialize.call(this, conn);
|
Actor.prototype.initialize.call(this, conn);
|
||||||
this._onProfilerEvent = this._onProfilerEvent.bind(this);
|
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
|
* The Promises Actor provides support for getting the list of live promises and
|
||||||
* observing changes to their settlement state.
|
* observing changes to their settlement state.
|
||||||
*/
|
*/
|
||||||
var PromisesActor = protocol.ActorClass(promisesSpec, {
|
var PromisesActor = protocol.ActorClassWithSpec(promisesSpec, {
|
||||||
/**
|
/**
|
||||||
* @param conn DebuggerServerConnection.
|
* @param conn DebuggerServerConnection.
|
||||||
* @param parent TabActor|RootActor
|
* @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 { ObjectActor, createValueGrip, longStringGrip } = require("devtools/server/actors/object");
|
||||||
const { SourceActor, getSourceURL } = require("devtools/server/actors/source");
|
const { SourceActor, getSourceURL } = require("devtools/server/actors/source");
|
||||||
const { DebuggerServer } = require("devtools/server/main");
|
const { DebuggerServer } = require("devtools/server/main");
|
||||||
const { ActorClass } = require("devtools/shared/protocol");
|
const { ActorClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||||
const flags = require("devtools/shared/flags");
|
const flags = require("devtools/shared/flags");
|
||||||
const { assert, dumpn, update, fetch } = DevToolsUtils;
|
const { assert, dumpn, update, fetch } = DevToolsUtils;
|
||||||
@@ -408,7 +408,7 @@ EventLoop.prototype = {
|
|||||||
* An optional (for content debugging only) reference to the content
|
* An optional (for content debugging only) reference to the content
|
||||||
* window.
|
* window.
|
||||||
*/
|
*/
|
||||||
const ThreadActor = ActorClass(threadSpec, {
|
const ThreadActor = ActorClassWithSpec(threadSpec, {
|
||||||
initialize: function (aParent, aGlobal) {
|
initialize: function (aParent, aGlobal) {
|
||||||
this._state = "detached";
|
this._state = "detached";
|
||||||
this._frameActors = [];
|
this._frameActors = [];
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ function loadSettingsFile() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var SettingsActor = exports.SettingsActor = protocol.ActorClass(settingsSpec, {
|
var SettingsActor = exports.SettingsActor = protocol.ActorClassWithSpec(settingsSpec, {
|
||||||
_getSettingsService: function () {
|
_getSettingsService: function () {
|
||||||
let win = Services.wm.getMostRecentWindow(DebuggerServer.chromeWindowType);
|
let win = Services.wm.getMostRecentWindow(DebuggerServer.chromeWindowType);
|
||||||
return win.navigator.mozSettings;
|
return win.navigator.mozSettings;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const Services = require("Services");
|
|||||||
const { BreakpointActor, setBreakpointAtEntryPoints } = require("devtools/server/actors/breakpoint");
|
const { BreakpointActor, setBreakpointAtEntryPoints } = require("devtools/server/actors/breakpoint");
|
||||||
const { OriginalLocation, GeneratedLocation } = require("devtools/server/actors/common");
|
const { OriginalLocation, GeneratedLocation } = require("devtools/server/actors/common");
|
||||||
const { createValueGrip } = require("devtools/server/actors/object");
|
const { createValueGrip } = require("devtools/server/actors/object");
|
||||||
const { ActorClass, Arg, RetVal, method } = require("devtools/shared/protocol");
|
const { ActorClassWithSpec, Arg, RetVal, method } = require("devtools/shared/protocol");
|
||||||
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||||
const { assert, fetch } = DevToolsUtils;
|
const { assert, fetch } = DevToolsUtils;
|
||||||
const { joinURI } = require("devtools/shared/path");
|
const { joinURI } = require("devtools/shared/path");
|
||||||
@@ -141,7 +141,7 @@ function resolveURIToLocalPath(aURI) {
|
|||||||
* @param String contentType
|
* @param String contentType
|
||||||
* Optional. The content type of this source, if immediately available.
|
* Optional. The content type of this source, if immediately available.
|
||||||
*/
|
*/
|
||||||
let SourceActor = ActorClass(sourceSpec, {
|
let SourceActor = ActorClassWithSpec(sourceSpec, {
|
||||||
typeName: "source",
|
typeName: "source",
|
||||||
|
|
||||||
initialize: function ({ source, thread, originalUrl, generatedSource,
|
initialize: function ({ source, thread, originalUrl, generatedSource,
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ StorageActors.createActor = function (options = {}, overrides = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let actorSpec = specs.childSpecs[options.typeName];
|
let actorSpec = specs.childSpecs[options.typeName];
|
||||||
let actor = protocol.ActorClass(actorSpec, actorObject);
|
let actor = protocol.ActorClassWithSpec(actorSpec, actorObject);
|
||||||
storageTypePool.set(actorObject.typeName, actor);
|
storageTypePool.set(actorObject.typeName, actor);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2162,7 +2162,7 @@ exports.setupParentProcessForIndexedDB = function ({ mm, prefix }) {
|
|||||||
/**
|
/**
|
||||||
* The main Storage Actor.
|
* The main Storage Actor.
|
||||||
*/
|
*/
|
||||||
let StorageActor = protocol.ActorClass(specs.storageSpec, {
|
let StorageActor = protocol.ActorClassWithSpec(specs.storageSpec, {
|
||||||
typeName: "storage",
|
typeName: "storage",
|
||||||
|
|
||||||
get window() {
|
get window() {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ var promise = require("promise");
|
|||||||
var protocol = require("devtools/shared/protocol");
|
var protocol = require("devtools/shared/protocol");
|
||||||
const {longStringSpec} = require("devtools/shared/specs/string");
|
const {longStringSpec} = require("devtools/shared/specs/string");
|
||||||
|
|
||||||
exports.LongStringActor = protocol.ActorClass(longStringSpec, {
|
exports.LongStringActor = protocol.ActorClassWithSpec(longStringSpec, {
|
||||||
initialize: function (conn, str) {
|
initialize: function (conn, str) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
this.str = str;
|
this.str = str;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ transition-property: all !important;\
|
|||||||
|
|
||||||
var LOAD_ERROR = "error-load";
|
var LOAD_ERROR = "error-load";
|
||||||
|
|
||||||
var OldStyleSheetActor = protocol.ActorClass(oldStyleSheetSpec, {
|
var OldStyleSheetActor = protocol.ActorClassWithSpec(oldStyleSheetSpec, {
|
||||||
toString: function() {
|
toString: function() {
|
||||||
return "[OldStyleSheetActor " + this.actorID + "]";
|
return "[OldStyleSheetActor " + this.actorID + "]";
|
||||||
},
|
},
|
||||||
@@ -321,7 +321,7 @@ exports.OldStyleSheetActor = OldStyleSheetActor;
|
|||||||
* Creates a StyleEditorActor. StyleEditorActor provides remote access to the
|
* Creates a StyleEditorActor. StyleEditorActor provides remote access to the
|
||||||
* stylesheets of a document.
|
* stylesheets of a document.
|
||||||
*/
|
*/
|
||||||
var StyleEditorActor = exports.StyleEditorActor = protocol.ActorClass(styleEditorSpec, {
|
var StyleEditorActor = exports.StyleEditorActor = protocol.ActorClassWithSpec(styleEditorSpec, {
|
||||||
/**
|
/**
|
||||||
* The window we work with, taken from the parent actor.
|
* 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
|
* The PageStyle actor lets the client look at the styles on a page, as
|
||||||
* they are applied to a given node.
|
* they are applied to a given node.
|
||||||
*/
|
*/
|
||||||
var PageStyleActor = protocol.ActorClass(pageStyleSpec, {
|
var PageStyleActor = protocol.ActorClassWithSpec(pageStyleSpec, {
|
||||||
/**
|
/**
|
||||||
* Create a PageStyleActor.
|
* Create a PageStyleActor.
|
||||||
*
|
*
|
||||||
@@ -925,7 +925,7 @@ exports.PageStyleActor = PageStyleActor;
|
|||||||
* (which have a CSSStyle but no CSSRule) we create a StyleRuleActor
|
* (which have a CSSStyle but no CSSRule) we create a StyleRuleActor
|
||||||
* with a special rule type (100).
|
* with a special rule type (100).
|
||||||
*/
|
*/
|
||||||
var StyleRuleActor = protocol.ActorClass(styleRuleSpec, {
|
var StyleRuleActor = protocol.ActorClassWithSpec(styleRuleSpec, {
|
||||||
initialize: function (pageStyle, item) {
|
initialize: function (pageStyle, item) {
|
||||||
protocol.Actor.prototype.initialize.call(this, null);
|
protocol.Actor.prototype.initialize.call(this, null);
|
||||||
this.pageStyle = pageStyle;
|
this.pageStyle = pageStyle;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ let modifiedStyleSheets = new WeakMap();
|
|||||||
* Actor representing an original source of a style sheet that was specified
|
* Actor representing an original source of a style sheet that was specified
|
||||||
* in a source map.
|
* in a source map.
|
||||||
*/
|
*/
|
||||||
var OriginalSourceActor = protocol.ActorClass(originalSourceSpec, {
|
var OriginalSourceActor = protocol.ActorClassWithSpec(originalSourceSpec, {
|
||||||
initialize: function (aUrl, aSourceMap, aParentActor) {
|
initialize: function (aUrl, aSourceMap, aParentActor) {
|
||||||
protocol.Actor.prototype.initialize.call(this, null);
|
protocol.Actor.prototype.initialize.call(this, null);
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ var OriginalSourceActor = protocol.ActorClass(originalSourceSpec, {
|
|||||||
* A MediaRuleActor lives on the server and provides access to properties
|
* A MediaRuleActor lives on the server and provides access to properties
|
||||||
* of a DOM @media rule and emits events when it changes.
|
* of a DOM @media rule and emits events when it changes.
|
||||||
*/
|
*/
|
||||||
var MediaRuleActor = protocol.ActorClass(mediaRuleSpec, {
|
var MediaRuleActor = protocol.ActorClassWithSpec(mediaRuleSpec, {
|
||||||
get window() {
|
get window() {
|
||||||
return this.parentActor.window;
|
return this.parentActor.window;
|
||||||
},
|
},
|
||||||
@@ -183,7 +183,7 @@ var MediaRuleActor = protocol.ActorClass(mediaRuleSpec, {
|
|||||||
/**
|
/**
|
||||||
* A StyleSheetActor represents a stylesheet on the server.
|
* A StyleSheetActor represents a stylesheet on the server.
|
||||||
*/
|
*/
|
||||||
var StyleSheetActor = protocol.ActorClass(styleSheetSpec, {
|
var StyleSheetActor = protocol.ActorClassWithSpec(styleSheetSpec, {
|
||||||
/* List of original sources that generated this stylesheet */
|
/* List of original sources that generated this stylesheet */
|
||||||
_originalSources: null,
|
_originalSources: null,
|
||||||
|
|
||||||
@@ -786,7 +786,7 @@ exports.StyleSheetActor = StyleSheetActor;
|
|||||||
* Creates a StyleSheetsActor. StyleSheetsActor provides remote access to the
|
* Creates a StyleSheetsActor. StyleSheetsActor provides remote access to the
|
||||||
* stylesheets of a document.
|
* stylesheets of a document.
|
||||||
*/
|
*/
|
||||||
var StyleSheetsActor = protocol.ActorClass(styleSheetsSpec, {
|
var StyleSheetsActor = protocol.ActorClassWithSpec(styleSheetsSpec, {
|
||||||
/**
|
/**
|
||||||
* The window we work with, taken from the parent actor.
|
* 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.
|
* The timeline actor pops and forwards timeline markers registered in docshells.
|
||||||
*/
|
*/
|
||||||
var TimelineActor = exports.TimelineActor = protocol.ActorClass(timelineSpec, {
|
var TimelineActor = exports.TimelineActor = protocol.ActorClassWithSpec(timelineSpec, {
|
||||||
/**
|
/**
|
||||||
* Initializes this actor with the provided connection and tab actor.
|
* 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
|
* An Audio Node actor allowing communication to a specific audio node in the
|
||||||
* Audio Context graph.
|
* Audio Context graph.
|
||||||
*/
|
*/
|
||||||
var AudioNodeActor = exports.AudioNodeActor = protocol.ActorClass(audionodeSpec, {
|
var AudioNodeActor = exports.AudioNodeActor = protocol.ActorClassWithSpec(audionodeSpec, {
|
||||||
form: function (detail) {
|
form: function (detail) {
|
||||||
if (detail === "actorid") {
|
if (detail === "actorid") {
|
||||||
return this.actorID;
|
return this.actorID;
|
||||||
@@ -404,7 +404,7 @@ var AudioNodeActor = exports.AudioNodeActor = protocol.ActorClass(audionodeSpec,
|
|||||||
* high-level methods. After instantiating this actor, you'll need to set it
|
* high-level methods. After instantiating this actor, you'll need to set it
|
||||||
* up by calling setup().
|
* up by calling setup().
|
||||||
*/
|
*/
|
||||||
var WebAudioActor = exports.WebAudioActor = protocol.ActorClass(webAudioSpec, {
|
var WebAudioActor = exports.WebAudioActor = protocol.ActorClassWithSpec(webAudioSpec, {
|
||||||
initialize: function (conn, tabActor) {
|
initialize: function (conn, tabActor) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
this.tabActor = tabActor;
|
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
|
* You can either retrieve, or compile the source of a shader, which will
|
||||||
* automatically inflict the necessary changes to the WebGL state.
|
* automatically inflict the necessary changes to the WebGL state.
|
||||||
*/
|
*/
|
||||||
var ShaderActor = protocol.ActorClass(shaderSpec, {
|
var ShaderActor = protocol.ActorClassWithSpec(shaderSpec, {
|
||||||
/**
|
/**
|
||||||
* Create the shader actor.
|
* Create the shader actor.
|
||||||
*
|
*
|
||||||
@@ -83,7 +83,7 @@ var ShaderActor = protocol.ActorClass(shaderSpec, {
|
|||||||
* A WebGL program is composed (at the moment, analogue to OpenGL ES 2.0)
|
* A WebGL program is composed (at the moment, analogue to OpenGL ES 2.0)
|
||||||
* of two shaders: a vertex shader and a fragment shader.
|
* of two shaders: a vertex shader and a fragment shader.
|
||||||
*/
|
*/
|
||||||
var ProgramActor = protocol.ActorClass(programSpec, {
|
var ProgramActor = protocol.ActorClassWithSpec(programSpec, {
|
||||||
/**
|
/**
|
||||||
* Create the program actor.
|
* Create the program actor.
|
||||||
*
|
*
|
||||||
@@ -184,7 +184,7 @@ var ProgramActor = protocol.ActorClass(programSpec, {
|
|||||||
* high-level methods. After instantiating this actor, you'll need to set it
|
* high-level methods. After instantiating this actor, you'll need to set it
|
||||||
* up by calling setup().
|
* up by calling setup().
|
||||||
*/
|
*/
|
||||||
var WebGLActor = exports.WebGLActor = protocol.ActorClass(webGLSpec, {
|
var WebGLActor = exports.WebGLActor = protocol.ActorClassWithSpec(webGLSpec, {
|
||||||
initialize: function (conn, tabActor) {
|
initialize: function (conn, tabActor) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
this.tabActor = tabActor;
|
this.tabActor = tabActor;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ function matchWorkerDebugger(dbg, options) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let WorkerActor = protocol.ActorClass(workerSpec, {
|
let WorkerActor = protocol.ActorClassWithSpec(workerSpec, {
|
||||||
initialize(conn, dbg) {
|
initialize(conn, dbg) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
this._dbg = dbg;
|
this._dbg = dbg;
|
||||||
@@ -313,7 +313,7 @@ WorkerActorList.prototype = {
|
|||||||
|
|
||||||
exports.WorkerActorList = WorkerActorList;
|
exports.WorkerActorList = WorkerActorList;
|
||||||
|
|
||||||
let PushSubscriptionActor = protocol.ActorClass(pushSubscriptionSpec, {
|
let PushSubscriptionActor = protocol.ActorClassWithSpec(pushSubscriptionSpec, {
|
||||||
initialize(conn, subscription) {
|
initialize(conn, subscription) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
this._subscription = subscription;
|
this._subscription = subscription;
|
||||||
@@ -343,7 +343,7 @@ let PushSubscriptionActor = protocol.ActorClass(pushSubscriptionSpec, {
|
|||||||
let _serviceWorkerProcessScriptLoaded = false;
|
let _serviceWorkerProcessScriptLoaded = false;
|
||||||
|
|
||||||
let ServiceWorkerRegistrationActor =
|
let ServiceWorkerRegistrationActor =
|
||||||
protocol.ActorClass(serviceWorkerRegistrationSpec, {
|
protocol.ActorClassWithSpec(serviceWorkerRegistrationSpec, {
|
||||||
/**
|
/**
|
||||||
* Create the ServiceWorkerRegistrationActor
|
* Create the ServiceWorkerRegistrationActor
|
||||||
* @param DebuggerServerConnection conn
|
* @param DebuggerServerConnection conn
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const helloSpec = protocol.generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var HelloActor = protocol.ActorClass(helloSpec, {
|
var HelloActor = protocol.ActorClassWithSpec(helloSpec, {
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
protocol.Actor.prototype.initialize.apply(this, arguments);
|
protocol.Actor.prototype.initialize.apply(this, arguments);
|
||||||
this.counter = 0;
|
this.counter = 0;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const helloSpec = protocol.generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var HelloActor = protocol.ActorClass(helloSpec, {
|
var HelloActor = protocol.ActorClassWithSpec(helloSpec, {
|
||||||
hello: function () {
|
hello: function () {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
var {method, RetVal, Actor, ActorClass, Front, FrontClass,
|
var {method, RetVal, Actor, ActorClassWithSpec, Front, FrontClassWithSpec,
|
||||||
generateActorSpec} = require("devtools/shared/protocol");
|
generateActorSpec} = require("devtools/shared/protocol");
|
||||||
var Services = require("Services");
|
var Services = require("Services");
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ const lazySpec = generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.LazyActor = ActorClass(lazySpec, {
|
exports.LazyActor = ActorClassWithSpec(lazySpec, {
|
||||||
initialize: function (conn, id) {
|
initialize: function (conn, id) {
|
||||||
Actor.prototype.initialize.call(this, conn);
|
Actor.prototype.initialize.call(this, conn);
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ exports.LazyActor = ActorClass(lazySpec, {
|
|||||||
|
|
||||||
Services.obs.notifyObservers(null, "actor", "loaded");
|
Services.obs.notifyObservers(null, "actor", "loaded");
|
||||||
|
|
||||||
exports.LazyFront = FrontClass(lazySpec, {
|
exports.LazyFront = FrontClassWithSpec(lazySpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.call(this, client);
|
Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = form.lazyActor;
|
this.actorID = form.lazyActor;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const rootSpec = protocol.generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootActor = protocol.ActorClass(rootSpec, {
|
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
|
||||||
typeName: "root",
|
typeName: "root",
|
||||||
initialize: function (conn) {
|
initialize: function (conn) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
@@ -45,7 +45,7 @@ var RootActor = protocol.ActorClass(rootSpec, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootFront = protocol.FrontClass(rootSpec, {
|
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
|
||||||
initialize: function (client) {
|
initialize: function (client) {
|
||||||
this.actorID = "root";
|
this.actorID = "root";
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const rootSpec = protocol.generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootActor = protocol.ActorClass(rootSpec, {
|
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
|
||||||
initialize: function (conn) {
|
initialize: function (conn) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
// Root actor owns itself.
|
// Root actor owns itself.
|
||||||
@@ -89,7 +89,7 @@ var RootActor = protocol.ActorClass(rootSpec, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootFront = protocol.FrontClass(rootSpec, {
|
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
|
||||||
initialize: function (client) {
|
initialize: function (client) {
|
||||||
this.actorID = "root";
|
this.actorID = "root";
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ const childSpec = protocol.generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var ChildActor = protocol.ActorClass(childSpec, {
|
var ChildActor = protocol.ActorClassWithSpec(childSpec, {
|
||||||
// Actors returned by this actor should be owned by the root actor.
|
// Actors returned by this actor should be owned by the root actor.
|
||||||
marshallPool: function () { return this.parent(); },
|
marshallPool: function () { return this.parent(); },
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ var ChildActor = protocol.ActorClass(childSpec, {
|
|||||||
release: function () { },
|
release: function () { },
|
||||||
});
|
});
|
||||||
|
|
||||||
var ChildFront = protocol.FrontClass(childSpec, {
|
var ChildFront = protocol.FrontClassWithSpec(childSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, form);
|
protocol.Front.prototype.initialize.call(this, client, form);
|
||||||
},
|
},
|
||||||
@@ -226,7 +226,7 @@ const rootSpec = protocol.generateActorSpec({
|
|||||||
});
|
});
|
||||||
|
|
||||||
var rootActor = null;
|
var rootActor = null;
|
||||||
var RootActor = protocol.ActorClass(rootSpec, {
|
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
|
||||||
toString: function () { return "[root actor]"; },
|
toString: function () { return "[root actor]"; },
|
||||||
|
|
||||||
initialize: function (conn) {
|
initialize: function (conn) {
|
||||||
@@ -287,7 +287,7 @@ var RootActor = protocol.ActorClass(rootSpec, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootFront = protocol.FrontClass(rootSpec, {
|
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
|
||||||
toString: function () { return "[root front]"; },
|
toString: function () { return "[root front]"; },
|
||||||
initialize: function (client) {
|
initialize: function (client) {
|
||||||
this.actorID = "root";
|
this.actorID = "root";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const childSpec = protocol.generateActorSpec({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// The child actor doesn't provide a form description
|
// The child actor doesn't provide a form description
|
||||||
var ChildActor = protocol.ActorClass(childSpec, {
|
var ChildActor = protocol.ActorClassWithSpec(childSpec, {
|
||||||
initialize(conn) {
|
initialize(conn) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
},
|
},
|
||||||
@@ -32,7 +32,7 @@ var ChildActor = protocol.ActorClass(childSpec, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var ChildFront = protocol.FrontClass(childSpec, {
|
var ChildFront = protocol.FrontClassWithSpec(childSpec, {
|
||||||
initialize(client) {
|
initialize(client) {
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
},
|
},
|
||||||
@@ -77,7 +77,7 @@ const rootSpec = protocol.generateActorSpec({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// The root actor does provide a form description.
|
// The root actor does provide a form description.
|
||||||
var RootActor = protocol.ActorClass(rootSpec, {
|
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
|
||||||
initialize(conn) {
|
initialize(conn) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
this.manage(this);
|
this.manage(this);
|
||||||
@@ -125,7 +125,7 @@ var RootActor = protocol.ActorClass(rootSpec, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootFront = protocol.FrontClass(rootSpec, {
|
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
|
||||||
initialize(client) {
|
initialize(client) {
|
||||||
this.actorID = "root";
|
this.actorID = "root";
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const rootSpec = protocol.generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootActor = protocol.ActorClass(rootSpec, {
|
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
|
||||||
initialize: function (conn) {
|
initialize: function (conn) {
|
||||||
rootActor = this;
|
rootActor = this;
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
@@ -80,7 +80,7 @@ var RootActor = protocol.ActorClass(rootSpec, {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootFront = protocol.FrontClass(rootSpec, {
|
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
|
||||||
initialize: function (client) {
|
initialize: function (client) {
|
||||||
this.actorID = "root";
|
this.actorID = "root";
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ const rootSpec = protocol.generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootActor = protocol.ActorClass(rootSpec, {
|
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
|
||||||
initialize: function (conn) {
|
initialize: function (conn) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
// Root actor owns itself.
|
// Root actor owns itself.
|
||||||
@@ -164,7 +164,7 @@ var RootActor = protocol.ActorClass(rootSpec, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootFront = protocol.FrontClass(rootSpec, {
|
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
|
||||||
initialize: function (client) {
|
initialize: function (client) {
|
||||||
this.actorID = "root";
|
this.actorID = "root";
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
@@ -181,7 +181,7 @@ function run_test()
|
|||||||
DebuggerServer.init();
|
DebuggerServer.init();
|
||||||
|
|
||||||
check_except(() => {
|
check_except(() => {
|
||||||
let badActor = ActorClass({}, {
|
let badActor = ActorClassWithSpec({}, {
|
||||||
missing: preEvent("missing-event", function () {
|
missing: preEvent("missing-event", function () {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const rootSpec = protocol.generateActorSpec({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootActor = protocol.ActorClass(rootSpec, {
|
var RootActor = protocol.ActorClassWithSpec(rootSpec, {
|
||||||
initialize: function (conn) {
|
initialize: function (conn) {
|
||||||
protocol.Actor.prototype.initialize.call(this, conn);
|
protocol.Actor.prototype.initialize.call(this, conn);
|
||||||
// Root actor owns itself.
|
// Root actor owns itself.
|
||||||
@@ -48,7 +48,7 @@ var RootActor = protocol.ActorClass(rootSpec, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var RootFront = protocol.FrontClass(rootSpec, {
|
var RootFront = protocol.FrontClassWithSpec(rootSpec, {
|
||||||
initialize: function (client) {
|
initialize: function (client) {
|
||||||
this.actorID = "root";
|
this.actorID = "root";
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const { custom } = protocol;
|
|||||||
|
|
||||||
loader.lazyImporter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
|
loader.lazyImporter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
|
||||||
|
|
||||||
const ActorActorFront = protocol.FrontClass(actorActorSpec, {
|
const ActorActorFront = protocol.FrontClassWithSpec(actorActorSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, form);
|
protocol.Front.prototype.initialize.call(this, client, form);
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ function request(uri) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const ActorRegistryFront = protocol.FrontClass(actorRegistrySpec, {
|
const ActorRegistryFront = protocol.FrontClassWithSpec(actorRegistrySpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client,
|
protocol.Front.prototype.initialize.call(this, client,
|
||||||
{ actor: form.actorRegistryActor });
|
{ actor: form.actorRegistryActor });
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
const {addonsSpec} = require("devtools/shared/specs/addons");
|
const {addonsSpec} = require("devtools/shared/specs/addons");
|
||||||
const protocol = require("devtools/shared/protocol");
|
const protocol = require("devtools/shared/protocol");
|
||||||
|
|
||||||
const AddonsFront = protocol.FrontClass(addonsSpec, {
|
const AddonsFront = protocol.FrontClassWithSpec(addonsSpec, {
|
||||||
initialize: function (client, {addonsActor}) {
|
initialize: function (client, {addonsActor}) {
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = addonsActor;
|
this.actorID = addonsActor;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
Front,
|
Front,
|
||||||
FrontClass,
|
FrontClassWithSpec,
|
||||||
custom,
|
custom,
|
||||||
preEvent
|
preEvent
|
||||||
} = require("devtools/shared/protocol");
|
} = require("devtools/shared/protocol");
|
||||||
@@ -15,7 +15,7 @@ const {
|
|||||||
} = require("devtools/shared/specs/animation");
|
} = require("devtools/shared/specs/animation");
|
||||||
const { Task } = require("devtools/shared/task");
|
const { Task } = require("devtools/shared/task");
|
||||||
|
|
||||||
const AnimationPlayerFront = FrontClass(animationPlayerSpec, {
|
const AnimationPlayerFront = FrontClassWithSpec(animationPlayerSpec, {
|
||||||
initialize: function (conn, form, detail, ctx) {
|
initialize: function (conn, form, detail, ctx) {
|
||||||
Front.prototype.initialize.call(this, conn, form, detail, ctx);
|
Front.prototype.initialize.call(this, conn, form, detail, ctx);
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ const AnimationPlayerFront = FrontClass(animationPlayerSpec, {
|
|||||||
|
|
||||||
exports.AnimationPlayerFront = AnimationPlayerFront;
|
exports.AnimationPlayerFront = AnimationPlayerFront;
|
||||||
|
|
||||||
const AnimationsFront = FrontClass(animationsSpec, {
|
const AnimationsFront = FrontClassWithSpec(animationsSpec, {
|
||||||
initialize: function (client, {animationsActor}) {
|
initialize: function (client, {animationsActor}) {
|
||||||
Front.prototype.initialize.call(this, client, {actor: animationsActor});
|
Front.prototype.initialize.call(this, client, {actor: animationsActor});
|
||||||
this.manage(this);
|
this.manage(this);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const protocol = require("devtools/shared/protocol");
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the FunctionCallActor.
|
* The corresponding Front object for the FunctionCallActor.
|
||||||
*/
|
*/
|
||||||
const FunctionCallFront = protocol.FrontClass(functionCallSpec, {
|
const FunctionCallFront = protocol.FrontClassWithSpec(functionCallSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, form);
|
protocol.Front.prototype.initialize.call(this, client, form);
|
||||||
},
|
},
|
||||||
@@ -38,7 +38,7 @@ exports.FunctionCallFront = FunctionCallFront;
|
|||||||
*/
|
*/
|
||||||
var CallWatcherFront =
|
var CallWatcherFront =
|
||||||
exports.CallWatcherFront =
|
exports.CallWatcherFront =
|
||||||
protocol.FrontClass(callWatcherSpec, {
|
protocol.FrontClassWithSpec(callWatcherSpec, {
|
||||||
initialize: function (client, { callWatcherActor }) {
|
initialize: function (client, { callWatcherActor }) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, { actor: callWatcherActor });
|
protocol.Front.prototype.initialize.call(this, client, { actor: callWatcherActor });
|
||||||
this.manage(this);
|
this.manage(this);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const promise = require("promise");
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the FrameSnapshotActor.
|
* The corresponding Front object for the FrameSnapshotActor.
|
||||||
*/
|
*/
|
||||||
const FrameSnapshotFront = protocol.FrontClass(frameSnapshotSpec, {
|
const FrameSnapshotFront = protocol.FrontClassWithSpec(frameSnapshotSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, form);
|
protocol.Front.prototype.initialize.call(this, client, form);
|
||||||
this._animationFrameEndScreenshot = null;
|
this._animationFrameEndScreenshot = null;
|
||||||
@@ -64,7 +64,7 @@ exports.FrameSnapshotFront = FrameSnapshotFront;
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the CanvasActor.
|
* The corresponding Front object for the CanvasActor.
|
||||||
*/
|
*/
|
||||||
const CanvasFront = protocol.FrontClass(canvasSpec, {
|
const CanvasFront = protocol.FrontClassWithSpec(canvasSpec, {
|
||||||
initialize: function (client, { canvasActor }) {
|
initialize: function (client, { canvasActor }) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, { actor: canvasActor });
|
protocol.Front.prototype.initialize.call(this, client, { actor: canvasActor });
|
||||||
this.manage(this);
|
this.manage(this);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { FrontClass, Front } = require("devtools/shared/protocol");
|
const { FrontClassWithSpec, Front } = require("devtools/shared/protocol");
|
||||||
const { cssPropertiesSpec } = require("devtools/shared/specs/css-properties");
|
const { cssPropertiesSpec } = require("devtools/shared/specs/css-properties");
|
||||||
const { Task } = require("devtools/shared/task");
|
const { Task } = require("devtools/shared/task");
|
||||||
const { CSS_PROPERTIES_DB } = require("devtools/shared/css-properties-db");
|
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
|
* interface that provides synchronous methods for finding out what CSS
|
||||||
* properties the current server supports.
|
* properties the current server supports.
|
||||||
*/
|
*/
|
||||||
const CssPropertiesFront = FrontClass(cssPropertiesSpec, {
|
const CssPropertiesFront = FrontClassWithSpec(cssPropertiesSpec, {
|
||||||
initialize: function (client, { cssPropertiesActor }) {
|
initialize: function (client, { cssPropertiesActor }) {
|
||||||
Front.prototype.initialize.call(this, client, {actor: cssPropertiesActor});
|
Front.prototype.initialize.call(this, client, {actor: cssPropertiesActor});
|
||||||
this.manage(this);
|
this.manage(this);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ var chromeWindow;
|
|||||||
/**
|
/**
|
||||||
* Front for CSSUsageActor
|
* Front for CSSUsageActor
|
||||||
*/
|
*/
|
||||||
const CSSUsageFront = protocol.FrontClass(cssUsageSpec, {
|
const CSSUsageFront = protocol.FrontClassWithSpec(cssUsageSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, form);
|
protocol.Front.prototype.initialize.call(this, client, form);
|
||||||
this.actorID = form.cssUsageActor;
|
this.actorID = form.cssUsageActor;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const {deviceSpec} = require("devtools/shared/specs/device");
|
|||||||
const protocol = require("devtools/shared/protocol");
|
const protocol = require("devtools/shared/protocol");
|
||||||
const defer = require("devtools/shared/defer");
|
const defer = require("devtools/shared/defer");
|
||||||
|
|
||||||
const DeviceFront = protocol.FrontClass(deviceSpec, {
|
const DeviceFront = protocol.FrontClassWithSpec(deviceSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = form.deviceActor;
|
this.actorID = form.deviceActor;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const protocol = require("devtools/shared/protocol");
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the MessagePortActor.
|
* The corresponding Front object for the MessagePortActor.
|
||||||
*/
|
*/
|
||||||
const MessagePortFront = protocol.FrontClass(messagePortSpec, {
|
const MessagePortFront = protocol.FrontClassWithSpec(messagePortSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, form);
|
protocol.Front.prototype.initialize.call(this, client, form);
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ exports.MessagePortFront = MessagePortFront;
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the DirectorScriptActor.
|
* The corresponding Front object for the DirectorScriptActor.
|
||||||
*/
|
*/
|
||||||
const DirectorScriptFront = protocol.FrontClass(directorScriptSpec, {
|
const DirectorScriptFront = protocol.FrontClassWithSpec(directorScriptSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, form);
|
protocol.Front.prototype.initialize.call(this, client, form);
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ exports.DirectorScriptFront = DirectorScriptFront;
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the DirectorManagerActor.
|
* The corresponding Front object for the DirectorManagerActor.
|
||||||
*/
|
*/
|
||||||
const DirectorManagerFront = protocol.FrontClass(directorManagerSpec, {
|
const DirectorManagerFront = protocol.FrontClassWithSpec(directorManagerSpec, {
|
||||||
initialize: function (client, { directorManagerActor }) {
|
initialize: function (client, { directorManagerActor }) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, {
|
protocol.Front.prototype.initialize.call(this, client, {
|
||||||
actor: directorManagerActor
|
actor: directorManagerActor
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const protocol = require("devtools/shared/protocol");
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the DirectorRegistryActor.
|
* The corresponding Front object for the DirectorRegistryActor.
|
||||||
*/
|
*/
|
||||||
const DirectorRegistryFront = protocol.FrontClass(directorRegistrySpec, {
|
const DirectorRegistryFront = protocol.FrontClassWithSpec(directorRegistrySpec, {
|
||||||
initialize: function (client, { directorRegistryActor }) {
|
initialize: function (client, { directorRegistryActor }) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, {
|
protocol.Front.prototype.initialize.call(this, client, {
|
||||||
actor: directorRegistryActor
|
actor: directorRegistryActor
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const { emulationSpec } = require("devtools/shared/specs/emulation");
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the EmulationActor.
|
* The corresponding Front object for the EmulationActor.
|
||||||
*/
|
*/
|
||||||
const EmulationFront = FrontClass(emulationSpec, {
|
const EmulationFront = FrontClassWithSpec(emulationSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.call(this, client);
|
Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = form.emulationActor;
|
this.actorID = form.emulationActor;
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Front, FrontClass } = require("devtools/shared/protocol");
|
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { eventLoopLagSpec } = require("devtools/shared/specs/eventlooplag");
|
const { eventLoopLagSpec } = require("devtools/shared/specs/eventlooplag");
|
||||||
|
|
||||||
exports.EventLoopLagFront = FrontClass(eventLoopLagSpec, {
|
exports.EventLoopLagFront = FrontClassWithSpec(eventLoopLagSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.call(this, client);
|
Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = form.eventLoopLagActor;
|
this.actorID = form.eventLoopLagActor;
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Front, FrontClass } = require("devtools/shared/protocol");
|
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { framerateSpec } = require("devtools/shared/specs/framerate");
|
const { framerateSpec } = require("devtools/shared/specs/framerate");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The corresponding Front object for the FramerateActor.
|
* The corresponding Front object for the FramerateActor.
|
||||||
*/
|
*/
|
||||||
var FramerateFront = exports.FramerateFront = FrontClass(framerateSpec, {
|
var FramerateFront = exports.FramerateFront = FrontClassWithSpec(framerateSpec, {
|
||||||
initialize: function (client, { framerateActor }) {
|
initialize: function (client, { framerateActor }) {
|
||||||
Front.prototype.initialize.call(this, client, { actor: framerateActor });
|
Front.prototype.initialize.call(this, client, { actor: framerateActor });
|
||||||
this.manage(this);
|
this.manage(this);
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Front, FrontClass } = require("devtools/shared/protocol");
|
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { gcliSpec } = require("devtools/shared/specs/gcli");
|
const { gcliSpec } = require("devtools/shared/specs/gcli");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const GcliFront = exports.GcliFront = FrontClass(gcliSpec, {
|
const GcliFront = exports.GcliFront = FrontClassWithSpec(gcliSpec, {
|
||||||
initialize: function (client, tabForm) {
|
initialize: function (client, tabForm) {
|
||||||
Front.prototype.initialize.call(this, client);
|
Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = tabForm.gcliActor;
|
this.actorID = tabForm.gcliActor;
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { FrontClass } = require("devtools/shared/protocol");
|
const { FrontClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const {
|
const {
|
||||||
customHighlighterSpec,
|
customHighlighterSpec,
|
||||||
highlighterSpec
|
highlighterSpec
|
||||||
} = require("devtools/shared/specs/highlighters");
|
} = require("devtools/shared/specs/highlighters");
|
||||||
|
|
||||||
const HighlighterFront = FrontClass(highlighterSpec, {
|
const HighlighterFront = FrontClassWithSpec(highlighterSpec, {
|
||||||
// Update the object given a form representation off the wire.
|
// Update the object given a form representation off the wire.
|
||||||
form: function (json) {
|
form: function (json) {
|
||||||
this.actorID = json.actor;
|
this.actorID = json.actor;
|
||||||
@@ -20,6 +20,6 @@ const HighlighterFront = FrontClass(highlighterSpec, {
|
|||||||
|
|
||||||
exports.HighlighterFront = HighlighterFront;
|
exports.HighlighterFront = HighlighterFront;
|
||||||
|
|
||||||
const CustomHighlighterFront = FrontClass(customHighlighterSpec, {});
|
const CustomHighlighterFront = FrontClassWithSpec(customHighlighterSpec, {});
|
||||||
|
|
||||||
exports.CustomHighlighterFront = CustomHighlighterFront;
|
exports.CustomHighlighterFront = CustomHighlighterFront;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ require("devtools/shared/fronts/highlighters");
|
|||||||
const { SimpleStringFront } = require("devtools/shared/fronts/string");
|
const { SimpleStringFront } = require("devtools/shared/fronts/string");
|
||||||
const {
|
const {
|
||||||
Front,
|
Front,
|
||||||
FrontClass,
|
FrontClassWithSpec,
|
||||||
custom,
|
custom,
|
||||||
preEvent,
|
preEvent,
|
||||||
types
|
types
|
||||||
@@ -84,7 +84,7 @@ const AttributeModificationList = Class({
|
|||||||
* the parent node from clients, but the `children` request should be used
|
* the parent node from clients, but the `children` request should be used
|
||||||
* to traverse children.
|
* to traverse children.
|
||||||
*/
|
*/
|
||||||
const NodeFront = FrontClass(nodeSpec, {
|
const NodeFront = FrontClassWithSpec(nodeSpec, {
|
||||||
initialize: function (conn, form, detail, ctx) {
|
initialize: function (conn, form, detail, ctx) {
|
||||||
// The parent node
|
// The parent node
|
||||||
this._parent = null;
|
this._parent = null;
|
||||||
@@ -444,7 +444,7 @@ exports.NodeFront = NodeFront;
|
|||||||
/**
|
/**
|
||||||
* Client side of a node list as returned by querySelectorAll()
|
* Client side of a node list as returned by querySelectorAll()
|
||||||
*/
|
*/
|
||||||
const NodeListFront = FrontClass(nodeListSpec, {
|
const NodeListFront = FrontClassWithSpec(nodeListSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.call(this, client, form);
|
Front.prototype.initialize.call(this, client, form);
|
||||||
},
|
},
|
||||||
@@ -484,7 +484,7 @@ exports.NodeListFront = NodeListFront;
|
|||||||
/**
|
/**
|
||||||
* Client side of the DOM walker.
|
* Client side of the DOM walker.
|
||||||
*/
|
*/
|
||||||
const WalkerFront = FrontClass(walkerSpec, {
|
const WalkerFront = FrontClassWithSpec(walkerSpec, {
|
||||||
// Set to true if cleanup should be requested after every mutation list.
|
// Set to true if cleanup should be requested after every mutation list.
|
||||||
autoCleanup: true,
|
autoCleanup: true,
|
||||||
|
|
||||||
@@ -940,7 +940,7 @@ exports.WalkerFront = WalkerFront;
|
|||||||
* Client side of the inspector actor, which is used to create
|
* Client side of the inspector actor, which is used to create
|
||||||
* inspector-related actors, including the walker.
|
* inspector-related actors, including the walker.
|
||||||
*/
|
*/
|
||||||
var InspectorFront = FrontClass(inspectorSpec, {
|
var InspectorFront = FrontClassWithSpec(inspectorSpec, {
|
||||||
initialize: function (client, tabForm) {
|
initialize: function (client, tabForm) {
|
||||||
Front.prototype.initialize.call(this, client);
|
Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = tabForm.inspectorActor;
|
this.actorID = tabForm.inspectorActor;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const protocol = require("devtools/shared/protocol");
|
|||||||
* front.start();
|
* front.start();
|
||||||
* // now wait for events to come
|
* // now wait for events to come
|
||||||
*/
|
*/
|
||||||
const ReflowFront = protocol.FrontClass(reflowSpec, {
|
const ReflowFront = protocol.FrontClassWithSpec(reflowSpec, {
|
||||||
initialize: function (client, {reflowActor}) {
|
initialize: function (client, {reflowActor}) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, {actor: reflowActor});
|
protocol.Front.prototype.initialize.call(this, client, {actor: reflowActor});
|
||||||
this.manage(this);
|
this.manage(this);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ loader.lazyRequireGetter(this, "FileUtils",
|
|||||||
loader.lazyRequireGetter(this, "HeapSnapshotFileUtils",
|
loader.lazyRequireGetter(this, "HeapSnapshotFileUtils",
|
||||||
"devtools/shared/heapsnapshot/HeapSnapshotFileUtils");
|
"devtools/shared/heapsnapshot/HeapSnapshotFileUtils");
|
||||||
|
|
||||||
const MemoryFront = protocol.FrontClass(memorySpec, {
|
const MemoryFront = protocol.FrontClassWithSpec(memorySpec, {
|
||||||
initialize: function (client, form, rootForm = null) {
|
initialize: function (client, form, rootForm = null) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, form);
|
protocol.Front.prototype.initialize.call(this, client, form);
|
||||||
this._client = client;
|
this._client = client;
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Front, FrontClass } = require("devtools/shared/protocol");
|
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const performanceSpec = require("devtools/shared/specs/performance-entries");
|
const performanceSpec = require("devtools/shared/specs/performance-entries");
|
||||||
|
|
||||||
var PerformanceEntriesFront = FrontClass(performanceSpec, {
|
var PerformanceEntriesFront = FrontClassWithSpec(performanceSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.call(this, client);
|
Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = form.performanceEntriesActor;
|
this.actorID = form.performanceEntriesActor;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Front, FrontClass } = require("devtools/shared/protocol");
|
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const { performanceRecordingSpec } = require("devtools/shared/specs/performance-recording");
|
const { performanceRecordingSpec } = require("devtools/shared/specs/performance-recording");
|
||||||
|
|
||||||
loader.lazyRequireGetter(this, "PerformanceIO",
|
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
|
* This can be used on older Profiler implementations, but the methods cannot
|
||||||
* be changed -- you must introduce a new method, and detect the server.
|
* be changed -- you must introduce a new method, and detect the server.
|
||||||
*/
|
*/
|
||||||
const PerformanceRecordingFront = FrontClass(performanceRecordingSpec, merge({
|
const PerformanceRecordingFront = FrontClassWithSpec(performanceRecordingSpec, merge({
|
||||||
form: function (form, detail) {
|
form: function (form, detail) {
|
||||||
if (detail === "actorid") {
|
if (detail === "actorid") {
|
||||||
this.actorID = form;
|
this.actorID = form;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Cu } = require("chrome");
|
const { Cu } = require("chrome");
|
||||||
const { Front, FrontClass, custom, preEvent } = require("devtools/shared/protocol");
|
const { Front, FrontClassWithSpec, custom, preEvent } = require("devtools/shared/protocol");
|
||||||
const { PerformanceRecordingFront } = require("devtools/shared/fronts/performance-recording");
|
const { PerformanceRecordingFront } = require("devtools/shared/fronts/performance-recording");
|
||||||
const { performanceSpec } = require("devtools/shared/specs/performance");
|
const { performanceSpec } = require("devtools/shared/specs/performance");
|
||||||
const { Task } = require("devtools/shared/task");
|
const { Task } = require("devtools/shared/task");
|
||||||
@@ -16,7 +16,7 @@ loader.lazyRequireGetter(this, "LegacyPerformanceFront",
|
|||||||
loader.lazyRequireGetter(this, "getSystemInfo",
|
loader.lazyRequireGetter(this, "getSystemInfo",
|
||||||
"devtools/shared/system", true);
|
"devtools/shared/system", true);
|
||||||
|
|
||||||
const PerformanceFront = FrontClass(performanceSpec, {
|
const PerformanceFront = FrontClassWithSpec(performanceSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.call(this, client, form);
|
Front.prototype.initialize.call(this, client, form);
|
||||||
this.actorID = form.performanceActor;
|
this.actorID = form.performanceActor;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
const {preferenceSpec} = require("devtools/shared/specs/preference");
|
const {preferenceSpec} = require("devtools/shared/specs/preference");
|
||||||
const protocol = require("devtools/shared/protocol");
|
const protocol = require("devtools/shared/protocol");
|
||||||
|
|
||||||
const PreferenceFront = protocol.FrontClass(preferenceSpec, {
|
const PreferenceFront = protocol.FrontClassWithSpec(preferenceSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = form.preferenceActor;
|
this.actorID = form.preferenceActor;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
const { Cu } = require("chrome");
|
const { Cu } = require("chrome");
|
||||||
const {
|
const {
|
||||||
Front,
|
Front,
|
||||||
FrontClass,
|
FrontClassWithSpec,
|
||||||
custom
|
custom
|
||||||
} = require("devtools/shared/protocol");
|
} = require("devtools/shared/protocol");
|
||||||
const { profilerSpec } = require("devtools/shared/specs/profiler");
|
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
|
* This can be used on older Profiler implementations, but the methods cannot
|
||||||
* be changed -- you must introduce a new method, and detect the server.
|
* be changed -- you must introduce a new method, and detect the server.
|
||||||
*/
|
*/
|
||||||
exports.ProfilerFront = FrontClass(profilerSpec, {
|
exports.ProfilerFront = FrontClassWithSpec(profilerSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.call(this, client, form);
|
Front.prototype.initialize.call(this, client, form);
|
||||||
this.actorID = form.profilerActor;
|
this.actorID = form.profilerActor;
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
Front,
|
Front,
|
||||||
FrontClass,
|
FrontClassWithSpec,
|
||||||
} = require("devtools/shared/protocol");
|
} = require("devtools/shared/protocol");
|
||||||
const { promisesSpec } = require("devtools/shared/specs/promises");
|
const { promisesSpec } = require("devtools/shared/specs/promises");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PromisesFront, the front for the PromisesActor.
|
* PromisesFront, the front for the PromisesActor.
|
||||||
*/
|
*/
|
||||||
const PromisesFront = FrontClass(promisesSpec, {
|
const PromisesFront = FrontClassWithSpec(promisesSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.call(this, client, form);
|
Front.prototype.initialize.call(this, client, form);
|
||||||
this.actorID = form.promisesActor;
|
this.actorID = form.promisesActor;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
const {settingsSpec} = require("devtools/shared/specs/settings");
|
const {settingsSpec} = require("devtools/shared/specs/settings");
|
||||||
const protocol = require("devtools/shared/protocol");
|
const protocol = require("devtools/shared/protocol");
|
||||||
|
|
||||||
const SettingsFront = protocol.FrontClass(settingsSpec, {
|
const SettingsFront = protocol.FrontClassWithSpec(settingsSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = form.settingsActor;
|
this.actorID = form.settingsActor;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const protocol = require("devtools/shared/protocol");
|
|||||||
const specs = require("devtools/shared/specs/storage");
|
const specs = require("devtools/shared/specs/storage");
|
||||||
|
|
||||||
for (let childSpec of Object.values(specs.childSpecs)) {
|
for (let childSpec of Object.values(specs.childSpecs)) {
|
||||||
protocol.FrontClass(childSpec, {
|
protocol.FrontClassWithSpec(childSpec, {
|
||||||
form(form, detail) {
|
form(form, detail) {
|
||||||
if (detail === "actorid") {
|
if (detail === "actorid") {
|
||||||
this.actorID = form;
|
this.actorID = form;
|
||||||
@@ -21,7 +21,7 @@ for (let childSpec of Object.values(specs.childSpecs)) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const StorageFront = protocol.FrontClass(specs.storageSpec, {
|
const StorageFront = protocol.FrontClassWithSpec(specs.storageSpec, {
|
||||||
initialize(client, tabForm) {
|
initialize(client, tabForm) {
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = tabForm.storageActor;
|
this.actorID = tabForm.storageActor;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const promise = require("promise");
|
|||||||
const {longStringSpec, SimpleStringFront} = require("devtools/shared/specs/string");
|
const {longStringSpec, SimpleStringFront} = require("devtools/shared/specs/string");
|
||||||
const protocol = require("devtools/shared/protocol");
|
const protocol = require("devtools/shared/protocol");
|
||||||
|
|
||||||
const LongStringFront = protocol.FrontClass(longStringSpec, {
|
const LongStringFront = protocol.FrontClassWithSpec(longStringSpec, {
|
||||||
initialize: function (client) {
|
initialize: function (client) {
|
||||||
protocol.Front.prototype.initialize.call(this, client);
|
protocol.Front.prototype.initialize.call(this, client);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { SimpleStringFront } = require("devtools/shared/fronts/string");
|
const { SimpleStringFront } = require("devtools/shared/fronts/string");
|
||||||
const { Front, FrontClass } = require("devtools/shared/protocol");
|
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const {
|
const {
|
||||||
oldStyleSheetSpec,
|
oldStyleSheetSpec,
|
||||||
styleEditorSpec
|
styleEditorSpec
|
||||||
@@ -16,7 +16,7 @@ const events = require("sdk/event/core");
|
|||||||
/**
|
/**
|
||||||
* StyleSheetFront is the client-side counterpart to a StyleSheetActor.
|
* StyleSheetFront is the client-side counterpart to a StyleSheetActor.
|
||||||
*/
|
*/
|
||||||
const OldStyleSheetFront = FrontClass(oldStyleSheetSpec, {
|
const OldStyleSheetFront = FrontClassWithSpec(oldStyleSheetSpec, {
|
||||||
initialize: function (conn, form, ctx, detail) {
|
initialize: function (conn, form, ctx, detail) {
|
||||||
Front.prototype.initialize.call(this, 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.
|
* The corresponding Front object for the StyleEditorActor.
|
||||||
*/
|
*/
|
||||||
const StyleEditorFront = FrontClass(styleEditorSpec, {
|
const StyleEditorFront = FrontClassWithSpec(styleEditorSpec, {
|
||||||
initialize: function (client, tabForm) {
|
initialize: function (client, tabForm) {
|
||||||
Front.prototype.initialize.call(this, client);
|
Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = tabForm.styleEditorActor;
|
this.actorID = tabForm.styleEditorActor;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
require("devtools/shared/fronts/stylesheets");
|
require("devtools/shared/fronts/stylesheets");
|
||||||
const {
|
const {
|
||||||
Front,
|
Front,
|
||||||
FrontClass,
|
FrontClassWithSpec,
|
||||||
custom,
|
custom,
|
||||||
preEvent
|
preEvent
|
||||||
} = require("devtools/shared/protocol");
|
} = require("devtools/shared/protocol");
|
||||||
@@ -22,7 +22,7 @@ const { RuleRewriter } = require("devtools/shared/css-parsing-utils");
|
|||||||
/**
|
/**
|
||||||
* PageStyleFront, the front object for the PageStyleActor
|
* PageStyleFront, the front object for the PageStyleActor
|
||||||
*/
|
*/
|
||||||
const PageStyleFront = FrontClass(pageStyleSpec, {
|
const PageStyleFront = FrontClassWithSpec(pageStyleSpec, {
|
||||||
initialize: function (conn, form, ctx, detail) {
|
initialize: function (conn, form, ctx, detail) {
|
||||||
Front.prototype.initialize.call(this, conn, form, ctx, detail);
|
Front.prototype.initialize.call(this, conn, form, ctx, detail);
|
||||||
this.inspector = this.parent();
|
this.inspector = this.parent();
|
||||||
@@ -90,7 +90,7 @@ exports.PageStyleFront = PageStyleFront;
|
|||||||
/**
|
/**
|
||||||
* StyleRuleFront, the front for the StyleRule actor.
|
* StyleRuleFront, the front for the StyleRule actor.
|
||||||
*/
|
*/
|
||||||
const StyleRuleFront = FrontClass(styleRuleSpec, {
|
const StyleRuleFront = FrontClassWithSpec(styleRuleSpec, {
|
||||||
initialize: function (client, form, ctx, detail) {
|
initialize: function (client, form, ctx, detail) {
|
||||||
Front.prototype.initialize.call(this, 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Front, FrontClass } = require("devtools/shared/protocol");
|
const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
|
||||||
const {
|
const {
|
||||||
getIndentationFromPrefs,
|
getIndentationFromPrefs,
|
||||||
getIndentationFromString
|
getIndentationFromString
|
||||||
@@ -21,7 +21,7 @@ const events = require("sdk/event/core");
|
|||||||
/**
|
/**
|
||||||
* The client-side counterpart for an OriginalSourceActor.
|
* The client-side counterpart for an OriginalSourceActor.
|
||||||
*/
|
*/
|
||||||
const OriginalSourceFront = FrontClass(originalSourceSpec, {
|
const OriginalSourceFront = FrontClassWithSpec(originalSourceSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.call(this, client, form);
|
Front.prototype.initialize.call(this, client, form);
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ exports.OriginalSourceFront = OriginalSourceFront;
|
|||||||
/**
|
/**
|
||||||
* Corresponding client-side front for a MediaRuleActor.
|
* Corresponding client-side front for a MediaRuleActor.
|
||||||
*/
|
*/
|
||||||
const MediaRuleFront = FrontClass(mediaRuleSpec, {
|
const MediaRuleFront = FrontClassWithSpec(mediaRuleSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
Front.prototype.initialize.call(this, 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.
|
* StyleSheetFront is the client-side counterpart to a StyleSheetActor.
|
||||||
*/
|
*/
|
||||||
const StyleSheetFront = FrontClass(styleSheetSpec, {
|
const StyleSheetFront = FrontClassWithSpec(styleSheetSpec, {
|
||||||
initialize: function (conn, form) {
|
initialize: function (conn, form) {
|
||||||
Front.prototype.initialize.call(this, conn, form);
|
Front.prototype.initialize.call(this, conn, form);
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ exports.StyleSheetFront = StyleSheetFront;
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the StyleSheetsActor.
|
* The corresponding Front object for the StyleSheetsActor.
|
||||||
*/
|
*/
|
||||||
const StyleSheetsFront = FrontClass(styleSheetsSpec, {
|
const StyleSheetsFront = FrontClassWithSpec(styleSheetsSpec, {
|
||||||
initialize: function (client, tabForm) {
|
initialize: function (client, tabForm) {
|
||||||
Front.prototype.initialize.call(this, client);
|
Front.prototype.initialize.call(this, client);
|
||||||
this.actorID = tabForm.styleSheetsActor;
|
this.actorID = tabForm.styleSheetsActor;
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
Front,
|
Front,
|
||||||
FrontClass,
|
FrontClassWithSpec,
|
||||||
} = require("devtools/shared/protocol");
|
} = require("devtools/shared/protocol");
|
||||||
const { timelineSpec } = require("devtools/shared/specs/timeline");
|
const { timelineSpec } = require("devtools/shared/specs/timeline");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TimelineFront, the front for the TimelineActor.
|
* TimelineFront, the front for the TimelineActor.
|
||||||
*/
|
*/
|
||||||
const TimelineFront = FrontClass(timelineSpec, {
|
const TimelineFront = FrontClassWithSpec(timelineSpec, {
|
||||||
initialize: function (client, { timelineActor }) {
|
initialize: function (client, { timelineActor }) {
|
||||||
Front.prototype.initialize.call(this, client, { actor: timelineActor });
|
Front.prototype.initialize.call(this, client, { actor: timelineActor });
|
||||||
this.manage(this);
|
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,
|
* Boolean indicating if the audio node is bypassable (splitter,
|
||||||
* merger and destination nodes, for example, are not)
|
* merger and destination nodes, for example, are not)
|
||||||
*/
|
*/
|
||||||
const AudioNodeFront = protocol.FrontClass(audionodeSpec, {
|
const AudioNodeFront = protocol.FrontClassWithSpec(audionodeSpec, {
|
||||||
form: function (form, detail) {
|
form: function (form, detail) {
|
||||||
if (detail === "actorid") {
|
if (detail === "actorid") {
|
||||||
this.actorID = form;
|
this.actorID = form;
|
||||||
@@ -53,7 +53,7 @@ exports.AudioNodeFront = AudioNodeFront;
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the WebAudioActor.
|
* The corresponding Front object for the WebAudioActor.
|
||||||
*/
|
*/
|
||||||
const WebAudioFront = protocol.FrontClass(webAudioSpec, {
|
const WebAudioFront = protocol.FrontClassWithSpec(webAudioSpec, {
|
||||||
initialize: function (client, { webaudioActor }) {
|
initialize: function (client, { webaudioActor }) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, { actor: webaudioActor });
|
protocol.Front.prototype.initialize.call(this, client, { actor: webaudioActor });
|
||||||
this.manage(this);
|
this.manage(this);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const protocol = require("devtools/shared/protocol");
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the ShaderActor.
|
* The corresponding Front object for the ShaderActor.
|
||||||
*/
|
*/
|
||||||
const ShaderFront = protocol.FrontClass(shaderSpec, {
|
const ShaderFront = protocol.FrontClassWithSpec(shaderSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, form);
|
protocol.Front.prototype.initialize.call(this, client, form);
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ exports.ShaderFront = ShaderFront;
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the ProgramActor.
|
* The corresponding Front object for the ProgramActor.
|
||||||
*/
|
*/
|
||||||
const ProgramFront = protocol.FrontClass(programSpec, {
|
const ProgramFront = protocol.FrontClassWithSpec(programSpec, {
|
||||||
initialize: function (client, form) {
|
initialize: function (client, form) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, form);
|
protocol.Front.prototype.initialize.call(this, client, form);
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ exports.ProgramFront = ProgramFront;
|
|||||||
/**
|
/**
|
||||||
* The corresponding Front object for the WebGLActor.
|
* The corresponding Front object for the WebGLActor.
|
||||||
*/
|
*/
|
||||||
const WebGLFront = protocol.FrontClass(webGLSpec, {
|
const WebGLFront = protocol.FrontClassWithSpec(webGLSpec, {
|
||||||
initialize: function (client, { webglActor }) {
|
initialize: function (client, { webglActor }) {
|
||||||
protocol.Front.prototype.initialize.call(this, client, { actor: webglActor });
|
protocol.Front.prototype.initialize.call(this, client, { actor: webglActor });
|
||||||
this.manage(this);
|
this.manage(this);
|
||||||
|
|||||||
@@ -1090,6 +1090,23 @@ var generateRequestHandlers = function (actorSpec, 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.
|
* Create an actor class for the given actor specification and prototype.
|
||||||
*
|
*
|
||||||
* @param object actorSpec
|
* @param object actorSpec
|
||||||
@@ -1098,7 +1115,7 @@ var generateRequestHandlers = function (actorSpec, actorProto) {
|
|||||||
* The actor prototype. Should have method definitions, can have event
|
* The actor prototype. Should have method definitions, can have event
|
||||||
* definitions.
|
* definitions.
|
||||||
*/
|
*/
|
||||||
var ActorClass = function (actorSpec, actorProto) {
|
var ActorClassWithSpec = function (actorSpec, actorProto) {
|
||||||
if (!actorSpec.typeName) {
|
if (!actorSpec.typeName) {
|
||||||
throw Error("Actor specification must have a typeName member.");
|
throw Error("Actor specification must have a typeName member.");
|
||||||
}
|
}
|
||||||
@@ -1108,7 +1125,7 @@ var ActorClass = function (actorSpec, actorProto) {
|
|||||||
|
|
||||||
return cls;
|
return cls;
|
||||||
};
|
};
|
||||||
exports.ActorClass = ActorClass;
|
exports.ActorClassWithSpec = ActorClassWithSpec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for client-side actor fronts.
|
* Base class for client-side actor fronts.
|
||||||
@@ -1410,6 +1427,19 @@ var generateRequestMethods = function (actorSpec, frontProto) {
|
|||||||
return frontProto;
|
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.
|
* Create a front class for the given actor specification and front prototype.
|
||||||
*
|
*
|
||||||
@@ -1419,7 +1449,7 @@ var generateRequestMethods = function (actorSpec, frontProto) {
|
|||||||
* The object prototype. Must have a 'typeName' property,
|
* The object prototype. Must have a 'typeName' property,
|
||||||
* should have method definitions, can have event definitions.
|
* should have method definitions, can have event definitions.
|
||||||
*/
|
*/
|
||||||
var FrontClass = function (actorSpec, frontProto) {
|
var FrontClassWithSpec = function (actorSpec, frontProto) {
|
||||||
frontProto.extends = Front;
|
frontProto.extends = Front;
|
||||||
let cls = Class(generateRequestMethods(actorSpec, frontProto));
|
let cls = Class(generateRequestMethods(actorSpec, frontProto));
|
||||||
|
|
||||||
@@ -1430,7 +1460,7 @@ var FrontClass = function (actorSpec, frontProto) {
|
|||||||
|
|
||||||
return cls;
|
return cls;
|
||||||
};
|
};
|
||||||
exports.FrontClass = FrontClass;
|
exports.FrontClassWithSpec = FrontClassWithSpec;
|
||||||
|
|
||||||
exports.dumpActorSpec = function (type) {
|
exports.dumpActorSpec = function (type) {
|
||||||
let actorSpec = type.actorSpec;
|
let actorSpec = type.actorSpec;
|
||||||
|
|||||||
Reference in New Issue
Block a user