Files
firefox/devtools/client/shared
Michael Ratcliffe 1aaa35121f Bug 1522273 - Markup view not working on elements containing a 'constructor' attribute r=rcaliman
`ATTRIBUTE_TYPES` was an object and we used to access it's attributes using e.g.
`ATTRIBUTE_TYPES["href"]`, which is fine in almost all cases.

The problem occurred when the attribute name was `"constructor"`. This caused us
to attempt to parse `ATTRIBUTE_TYPES["constructor"]`, which returned
`{}.constructor` therefore breaking the attribute parser.

Changing `ATTRIBUTE_TYPES` to a Map fixes the issue because
`ATTRIBUTE_TYPES.get("constructor")` returns null rather than an object
constructor.

Differential Revision: https://phabricator.services.mozilla.com/D18220
2019-01-31 15:48:41 +00:00
..