diff options
Diffstat (limited to 'devtools/shared/webconsole/js-property-provider.js')
-rw-r--r-- | devtools/shared/webconsole/js-property-provider.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/devtools/shared/webconsole/js-property-provider.js b/devtools/shared/webconsole/js-property-provider.js index ca30e8f57b..bf02207a26 100644 --- a/devtools/shared/webconsole/js-property-provider.js +++ b/devtools/shared/webconsole/js-property-provider.js @@ -19,9 +19,15 @@ if (!isWorker) { ); } const lazy = {}; -ChromeUtils.defineESModuleGetters(lazy, { - Reflect: "resource://gre/modules/reflect.sys.mjs", -}); +if (!isWorker) { + ChromeUtils.defineESModuleGetters( + lazy, + { + Reflect: "resource://gre/modules/reflect.sys.mjs", + }, + { global: "contextual" } + ); +} loader.lazyRequireGetter( this, [ @@ -644,7 +650,7 @@ function getMatchedPropsImpl(obj, match, { chainIterator, getProperties }) { // This uses a trick: converting a string to a number yields NaN if // the operation failed, and NaN is not equal to itself. // eslint-disable-next-line no-self-compare - if (+prop != +prop) { + if (+prop != +prop || prop === "Infinity") { matches.add(prop); } @@ -746,7 +752,7 @@ var DebuggerObjectSupport = { } }, - getProperty(obj, name, rootObj) { + getProperty() { // This is left unimplemented in favor to DevToolsUtils.getProperty(). throw new Error("Unimplemented!"); }, |