Bug 1277953 - Use ActorClassWithSpec for the FrameActor; r=ejpbruel
authorNick Fitzgerald <fitzgen@gmail.com>
Mon, 06 Jun 2016 10:24:34 -0700
changeset 325693 c08999100460906b4d8cbea3f2e1e699b2d6c7c4
parent 325692 9565f97ec755feb27c08a171a8d6cbaed2870a58
child 325694 8badc9fb7730f469c35daa3a8534958021159d6d
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersejpbruel
bugs1277953
milestone49.0a1
Bug 1277953 - Use ActorClassWithSpec for the FrameActor; r=ejpbruel
devtools/server/actors/frame.js
devtools/shared/specs/frame.js
devtools/shared/specs/moz.build
--- a/devtools/server/actors/frame.js
+++ b/devtools/server/actors/frame.js
@@ -3,24 +3,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { ActorPool } = require("devtools/server/actors/common");
 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");
 
 /**
  * An actor for a specified stack frame.
  */
-let FrameActor = ActorClass({
-  typeName: "frame",
-
+let FrameActor = ActorClassWithSpec(frameSpec, {
   /**
    * Creates the Frame actor.
    *
    * @param frame Debugger.Frame
    *        The debuggee frame.
    * @param threadActor ThreadActor
    *        The parent thread actor for this frame.
    */
new file mode 100644
--- /dev/null
+++ b/devtools/shared/specs/frame.js
@@ -0,0 +1,14 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+"use strict";
+
+const {Arg, RetVal, generateActorSpec} = require("devtools/shared/protocol");
+
+const frameSpec = generateActorSpec({
+  typeName: "frame",
+
+  methods: {},
+});
+
+exports.frameSpec = frameSpec;
--- a/devtools/shared/specs/moz.build
+++ b/devtools/shared/specs/moz.build
@@ -7,16 +7,17 @@
 DevToolsModules(
     'actor-registry.js',
     'addons.js',
     'animation.js',
     'breakpoint.js',
     'call-watcher.js',
     'canvas.js',
     'css-properties.js',
+    'frame.js',
     'heap-snapshot-file.js',
     'highlighters.js',
     'inspector.js',
     'node.js',
     'preference.js',
     'script.js',
     'settings.js',
     'source.js',