Bug 1310630 - Pass a createLongStringClient prop to the ObjectInspector; r=bgrins,Honza.
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Mon, 16 Apr 2018 11:32:29 +0200
changeset 468343 b0d116ec45465be143a9e3504efd9e6ea19c6c0c
parent 468342 2ddb032c4520f9ca8dddfa655f72b2d1e8481890
child 468344 b041e24789f9656580976e54470b433d781f9f87
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins, Honza
bugs1310630, 1403448
milestone61.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 1310630 - Pass a createLongStringClient prop to the ObjectInspector; r=bgrins,Honza. This will allow long strings to be expanded. Tests will be added per Bug 1403448. MozReview-Commit-ID: CUUN6uWTMDF
devtools/client/webconsole/utils/object-inspector.js
--- a/devtools/client/webconsole/utils/object-inspector.js
+++ b/devtools/client/webconsole/utils/object-inspector.js
@@ -1,16 +1,17 @@
 /* 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 { createFactory } = require("devtools/client/shared/vendor/react");
 const ObjectClient = require("devtools/shared/client/object-client");
+const LongStringClient = require("devtools/shared/client/long-string-client");
 
 const reps = require("devtools/client/shared/components/reps/reps");
 const { REPS, MODE } = reps;
 const ObjectInspector = createFactory(reps.ObjectInspector);
 const { Grip } = REPS;
 
 /**
  * Create and return an ObjectInspector for the given grip.
@@ -52,16 +53,18 @@ function getObjectInspector(grip, servic
     roots: [{
       path: (grip && grip.actor) || JSON.stringify(grip),
       contents: {
         value: grip
       }
     }],
     createObjectClient: object =>
       new ObjectClient(serviceContainer.hudProxy.client, object),
+    createLongStringClient: object =>
+      new LongStringClient(serviceContainer.hudProxy.client, object),
     releaseActor: actor => {
       if (!actor || !serviceContainer.hudProxy.releaseActor) {
         return;
       }
       serviceContainer.hudProxy.releaseActor(actor);
     },
     onViewSourceInDebugger: serviceContainer.onViewSourceInDebugger,
     openLink: serviceContainer.openLink,