Bug 821610 - Provide methods to set and remove XHR breakpoints within thread client r=loganfsmyth
authorDavid Walsh <dwalsh@mozilla.com>
Fri, 12 Oct 2018 13:00:35 -0500
changeset 499799 ffb770ed38711114be60f6c2f8f95971b3c6589f
parent 499798 6b57b7631a5d62bd2fc4cf267f7224f0dac8de58
child 499800 ffb2909f660d4ea2f9961e5d1d4964a2c98e51a3
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersloganfsmyth
bugs821610
milestone64.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 821610 - Provide methods to set and remove XHR breakpoints within thread client r=loganfsmyth
devtools/shared/client/thread-client.js
--- a/devtools/shared/client/thread-client.js
+++ b/devtools/shared/client/thread-client.js
@@ -694,16 +694,40 @@ ThreadClient.prototype = {
     this.client._eventsEnabled && this.emit(packet.type, packet);
   },
 
   getLastPausePacket: function() {
     return this._lastPausePacket;
   },
 
   /**
+   * Requests to set XHR breakpoint
+   * @param string path
+   *        pause when url contains `path`
+   * @param string method
+   *        pause when method of request is `method`
+   */
+  setXHRBreakpoint: DebuggerClient.requester({
+    type: "setXHRBreakpoint",
+    path: arg(0),
+    method: arg(1)
+  }),
+
+  /**
+   * Request to remove XHR breakpoint
+   * @param string path
+   * @param string method
+   */
+  removeXHRBreakpoint: DebuggerClient.requester({
+    type: "removeXHRBreakpoint",
+    path: arg(0),
+    method: arg(1)
+  }),
+
+  /**
    * Return an EnvironmentClient instance for the given environment actor form.
    */
   environment: function(form) {
     return new EnvironmentClient(this.client, form);
   },
 
   /**
    * Return an instance of SourceClient for the given source actor form.