Bug 1430799 - Add a createObjectClient method to the DebuggerClient;r=jlast.
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Tue, 16 Jan 2018 17:25:58 +0100
changeset 453974 f3e1fd49ad093f343538a34f826eecb229cdd8e6
parent 453973 eac8b4f5f6b6f261adc42a5f6e6ef5c6f10af468
child 453975 55b95957d30bddff2bf78f07fca2f6046141873d
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast
bugs1430799
milestone59.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 1430799 - Add a createObjectClient method to the DebuggerClient;r=jlast. This is needed by the debugger in order to use the latest devtools-reps package (0.19.0). This function was already added in the devtools-connection package. MozReview-Commit-ID: 3SVxq4Jbs16
devtools/shared/client/debugger-client.js
--- a/devtools/shared/client/debugger-client.js
+++ b/devtools/shared/client/debugger-client.js
@@ -24,16 +24,17 @@ loader.lazyRequireGetter(this, "getDevic
 
 loader.lazyRequireGetter(this, "WebConsoleClient", "devtools/shared/webconsole/client", true);
 loader.lazyRequireGetter(this, "AddonClient", "devtools/shared/client/addon-client");
 loader.lazyRequireGetter(this, "RootClient", "devtools/shared/client/root-client");
 loader.lazyRequireGetter(this, "TabClient", "devtools/shared/client/tab-client");
 loader.lazyRequireGetter(this, "ThreadClient", "devtools/shared/client/thread-client");
 loader.lazyRequireGetter(this, "TraceClient", "devtools/shared/client/trace-client");
 loader.lazyRequireGetter(this, "WorkerClient", "devtools/shared/client/worker-client");
+loader.lazyRequireGetter(this, "ObjectClient", "devtools/shared/client/object-client");
 
 const noop = () => {};
 
 // Define the minimum officially supported version of Firefox when connecting to a remote
 // runtime. (Use ".0a1" to support the very first nightly version)
 // This is usually the current ESR version.
 const MIN_SUPPORTED_PLATFORM_VERSION = "52.0a1";
 const MS_PER_DAY = 86400000;
@@ -1189,17 +1190,26 @@ DebuggerClient.prototype = {
       }
     }
     return null;
   },
 
   /**
    * Currently attached addon.
    */
-  activeAddon: null
+  activeAddon: null,
+
+  /**
+   * Creates an object client for this DebuggerClient and the grip in parameter,
+   * @param {Object} grip: The grip to create the ObjectClient for.
+   * @returns {ObjectClient}
+   */
+  createObjectClient: function (grip) {
+    return new ObjectClient(this, grip);
+  }
 };
 
 eventSource(DebuggerClient.prototype);
 
 class Request extends EventEmitter {
   constructor(request) {
     super();
     this.request = request;