Closed Bug 1442614 Opened 7 years ago Closed 7 years ago

Show internal prototype slot as [[prototype]] instead of __proto__

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1390027

People

(Reporter: a.d.bergi, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.189 Safari/537.36 Vivaldi/1.95.1077.55 Steps to reproduce: Log an object or use the inspector Actual results: It shows __proto__ as part of the properties of the object Expected results: It should highlight the fact that the prototype link is special and not a normal property. It should use a syntax like <proto> or <prototype> or [[prototype]]. Probably it should should follow the ECMAScript spec convention of denoting internal slots with double brackets. __proto__ is deprecated and should not be used any more in any code (the replacements Object.getPrototypeOf/setPrototypeOf work much better). __proto__ is just an inherited getter/setter, but seeing it in the devtools is very confusing. Especially for new developers, it leads to a misguided understanding, thinking that __proto__ is an own property of every object that will be used for looking up inherited properties. They continue to use it in their own code to access (and sometimes even change) the prototype chain, not being aware that they use a deprecated web-legacy feature.
Just found a similar feature request in https://bugzilla.mozilla.org/show_bug.cgi?id=1390027: > I think it's a good time to remove the confusing magic about __proto__. > I would reference the [[Prototype]] using the console's notation for internal slots, > i.e. <proto> or <prototype> instead of __proto__. > And I would show this on all non-proxy objects, including Object.create(null) and Object.prototype.
Component: Untriaged → Developer Tools
Hello, This is now fixed in Nightly (you can have a look at Bug 1390027 for more insights), so I'm closing the bug.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.