Bug 1310630 - Pass a createLongStringClient prop to the ObjectInspector; r=bgrins.
This will allow long strings to be expanded.
Tests will be added per
Bug 1403448.
MozReview-Commit-ID: CUUN6uWTMDF
--- 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,