Bug 1973939 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Seems to be coming from the following code
https://searchfox.org/mozilla-central/rev/ec8a326713f60dec138a3e3383b03ac739870fc7/mobile/shared/modules/geckoview/GeckoViewRemoteDebugger.sys.mjs#9-14
```js
ChromeUtils.defineLazyGetter(lazy, "require", () => {
  const { require } = ChromeUtils.importESModule(
    "resource://devtools/shared/loader/Loader.sys.mjs"
  );
  return require;
});
```
We should pass `{ global: "devtools" }` to `importESModule()` so that the whole devtools server loads in a distinct compartment.
This will also prevents the many
Seems to be coming from the following code
https://searchfox.org/mozilla-central/rev/ec8a326713f60dec138a3e3383b03ac739870fc7/mobile/shared/modules/geckoview/GeckoViewRemoteDebugger.sys.mjs#9-14
```js
ChromeUtils.defineLazyGetter(lazy, "require", () => {
  const { require } = ChromeUtils.importESModule(
    "resource://devtools/shared/loader/Loader.sys.mjs"
  );
  return require;
});
```
We should pass `{ global: "devtools" }` to `importESModule()` so that the whole devtools server loads in a distinct compartment.

Back to Bug 1973939 Comment 1