Bug 1929390 - [devtools] Import objectInspector without going through Reps. r=devtools-reviewers,nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D228994
This commit is contained in:
Alexandre Poirot 2024-11-14 21:43:34 +00:00
parent 6448d4d797
commit b1731033db
13 changed files with 16 additions and 17 deletions

View File

@ -23,7 +23,7 @@ import * as preview from "./preview";
import * as tracing from "./tracing";
import * as contextMenu from "./context-menus/index";
import { objectInspector } from "devtools/client/shared/components/reps/index";
import * as objectInspector from "devtools/client/shared/components/object-inspector/index";
export default {
...ast,

View File

@ -5,7 +5,7 @@
import { createFrame } from "./create";
import { makeBreakpointServerLocationId } from "../../utils/breakpoint/index";
import Reps from "devtools/client/shared/components/reps/index";
import * as objectInspector from "resource://devtools/client/shared/components/object-inspector/index.js";
let commands;
let breakpoints;
@ -46,7 +46,7 @@ function createObjectFront(grip, frame) {
}
async function loadObjectProperties(root, threadActorID) {
const { utils } = Reps.objectInspector;
const { utils } = objectInspector;
const properties = await utils.loadProperties.loadItemProperties(
root,
commands.client,

View File

@ -11,8 +11,8 @@ import Reps from "devtools/client/shared/components/reps/index";
const {
REPS: { Grip },
MODE,
objectInspector,
} = Reps;
import * as objectInspector from "resource://devtools/client/shared/components/object-inspector/index.js";
const { ObjectInspector, utils } = objectInspector;

View File

@ -18,7 +18,7 @@ import { connect } from "devtools/client/shared/vendor/react-redux";
import { features } from "../../utils/prefs";
import AccessibleImage from "../shared/AccessibleImage";
import { objectInspector } from "devtools/client/shared/components/reps/index";
import * as objectInspector from "resource://devtools/client/shared/components/object-inspector/index.js";
import actions from "../../actions/index";
import {

View File

@ -30,7 +30,7 @@ import {
} from "../../utils/pause/scopes";
import { clientCommands } from "../../client/firefox";
import { objectInspector } from "devtools/client/shared/components/reps/index";
import * as objectInspector from "resource://devtools/client/shared/components/object-inspector/index.js";
const { ObjectInspector } = objectInspector;
class Scopes extends PureComponent {

View File

@ -27,7 +27,7 @@ import eventListenerBreakpoints, {
import exceptions, { initialExceptionsState } from "./exceptions";
import tracerFrames from "./tracer-frames";
import { objectInspector } from "devtools/client/shared/components/reps/index";
import * as objectInspector from "resource://devtools/client/shared/components/object-inspector/index.js";
/**
* Note that this is only used by jest tests.

View File

@ -34,7 +34,7 @@ export {
} from "./visibleBreakpoints";
export * from "./visibleColumnBreakpoints";
import { objectInspector } from "devtools/client/shared/components/reps/index";
import * as objectInspector from "resource://devtools/client/shared/components/object-inspector/index.js";
const { reducer } = objectInspector;

View File

@ -5,7 +5,7 @@
// This file contains utility functions which supports the structure & display of
// scopes information in Scopes panel.
import { objectInspector } from "devtools/client/shared/components/reps/index";
import * as objectInspector from "resource://devtools/client/shared/components/object-inspector/index.js";
import { simplifyDisplayName } from "../pause/frames/index";
const {

View File

@ -19,8 +19,10 @@ const Types = require("resource://devtools/client/inspector/extensions/types.js"
const {
REPS: { Grip },
MODE,
objectInspector: { ObjectInspector: ObjectInspectorClass },
} = require("resource://devtools/client/shared/components/reps/index.js");
const {
ObjectInspector: ObjectInspectorClass,
} = require("resource://devtools/client/shared/components/object-inspector/index.js");
loader.lazyRequireGetter(
this,

View File

@ -11,7 +11,6 @@ const {
REPS,
getRep,
} = require("resource://devtools/client/shared/components/reps/reps/rep.js");
const objectInspector = require("resource://devtools/client/shared/components/object-inspector/index.js");
const {
parseURLEncodedText,
@ -28,5 +27,4 @@ module.exports = {
parseURLEncodedText,
parseURLParams,
getGripPreviewItems,
objectInspector,
};

View File

@ -203,9 +203,9 @@ define(function (require, exports, module) {
// Here we have a non custom-formatted grip, so we let the ObjectInspector
// handles it.
const {
objectInspector,
MODE,
} = require("resource://devtools/client/shared/components/reps/index.js");
const objectInspector = require("resource://devtools/client/shared/components/object-inspector/index.js");
childElement = createElement(objectInspector.ObjectInspector, {
...props,
mode: props.mode == MODE.LONG ? MODE.SHORT : MODE.TINY,

View File

@ -19,8 +19,7 @@ const {
const actions = require("resource://devtools/client/webconsole/actions/index.js");
loader.lazyGetter(this, "objectInspector", function () {
return require("resource://devtools/client/shared/components/reps/index.js")
.objectInspector;
return require("resource://devtools/client/shared/components/object-inspector/index.js");
});
loader.lazyGetter(this, "MODE", function () {

View File

@ -18,8 +18,8 @@ loader.lazyGetter(this, "MODE", function () {
.MODE;
});
loader.lazyGetter(this, "ObjectInspector", function () {
const reps = require("resource://devtools/client/shared/components/reps/index.js");
return createFactory(reps.objectInspector.ObjectInspector);
const objectInspector = require("resource://devtools/client/shared/components/object-inspector/index.js");
return createFactory(objectInspector.ObjectInspector);
});
loader.lazyRequireGetter(