Loading
Bug 1835680 - [devtools] Use proxy target when walking up prototype chain for...
Bug 1835680 - [devtools] Use proxy target when walking up prototype chain for autocomplete. r=devtools-reviewers,jdescottes. In the JSPropertyProvider, we are walking up the prototype to retrieve properties. For proxies with `getPrototypeOf` trap, this means that we were returning erroneous values, as the prototype chain of the proxy isn't altered by the trap. Worse, it could lead to infinite loop if the trap was setting a circular reference. To avoid this, when dealing with a proxy, we retrieve the prototype of the proxy target. Test cases are added to ensure we don't regress this. Differential Revision: https://phabricator.services.mozilla.com/D179640