Bug 1450284 - Complete method set in the Spec for Thread; r=jdescottes,ochameau
authoryulia <ystartsev@mozilla.com>
Mon, 13 May 2019 13:55:44 +0000
changeset 532441 dd5b92f8983514052be15d7f88a3dd0cfec9b892
parent 532440 f4ab69d7aabffb076527e9768a0a69140dcb631e
child 532442 7e6b874b870a9ff00815ff655d1309e86c5df654
push id11268
push usercsabou@mozilla.com
push dateTue, 14 May 2019 15:24:22 +0000
treeherdermozilla-beta@5fb7fcd568d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes, ochameau
bugs1450284
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1450284 - Complete method set in the Spec for Thread; r=jdescottes,ochameau We need a complete specification in order to move forward with the front conversion. I think this will also impact other parts of the refactoring, such as some of the thread specific code in the debugger-client. This is a first pass, I did not go into detail about the return types. Differential Revision: https://phabricator.services.mozilla.com/D28640
devtools/shared/specs/script.js
--- a/devtools/shared/specs/script.js
+++ b/devtools/shared/specs/script.js
@@ -1,28 +1,94 @@
 /* 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, types} = require("devtools/shared/protocol");
+const {Arg, Option, RetVal, generateActorSpec, types} = require("devtools/shared/protocol");
 
 types.addDictType("available-breakpoint-group", {
   name: "string",
   events: "array:available-breakpoint-event",
 });
 types.addDictType("available-breakpoint-event", {
   id: "string",
   name: "string",
 });
 
 const threadSpec = generateActorSpec({
   typeName: "context",
 
+  events: {
+    newSource: {
+      source: Option(0, "source"),
+    },
+    progress: {
+      recording: Option(0, "json"),
+      executionPoint: Option(0, "json"),
+    },
+  },
+
   methods: {
+    attach: {
+      request: {
+        options: Arg(0, "json"),
+      },
+      response: RetVal("nullable:json"),
+    },
+    detach: {
+      response: {},
+    },
+    reconfigure: {
+      request: {
+        options: Arg(0, "json"),
+      },
+      response: {},
+    },
+    resume: {
+      request: {
+        resumeLimit: Arg(0, "nullable:json"),
+        rewind: Arg(1, "boolean"),
+      },
+      response: RetVal("nullable:json"),
+    },
+    frames: {
+      request: {
+        start: Arg(0, "number"),
+        count: Arg(1, "number"),
+      },
+      response: RetVal("json"),
+    },
+    interrupt: {
+      request: {
+        when: Arg(0, "json"),
+      },
+      response: RetVal("array:json"),
+    },
+    sources: {
+      response: RetVal("array:json"),
+    },
+    skipBreakpoints: {
+      request: {
+        skip: Arg(0, "json"),
+      },
+      response: {
+        skip: Arg(0, "json"),
+      },
+    },
+    threadGrips: {
+      request: {
+        actors: Arg(0, "array:string"),
+      },
+      response: RetVal("json"),
+    },
+    dumpThread: {
+      request: {},
+      response: RetVal("json"),
+    },
     setBreakpoint: {
       request: {
         location: Arg(0, "json"),
         options: Arg(1, "json"),
       },
     },
     removeBreakpoint: {
       request: {