Closed Bug 840006 Opened 12 years ago Closed 12 years ago

Automatically expand __proto__s until they're not void of properties or [object Object] is reached in the Variables View

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: vporof, Assigned: vporof)

References

Details

No description provided.
Depends on: 830818
I am not sure if all relevant cases will have Object.prototype at the end of the prototype chain. I think we should just treat all prototypes equally and stop when the chain ends or the current object hash more than one property.
(In reply to Panos Astithas [:past] from comment #1) > I am not sure if all relevant cases will have Object.prototype at the end of > the prototype chain. I think we should just treat all prototypes equally and > stop when the chain ends or the current object hash more than one property. Hmm, that's why I specified 'or': (not void of properties) or ([object Object] is reached) Isn't that a good approximation of expectations? (I may be wrong) Would you ever want to see a base object's prototype properties automatically?
(In reply to Victor Porof [:vp] from comment #2) > Hmm, that's why I specified 'or': (not void of properties) or ([object > Object] is reached) Isn't that a good approximation of expectations? (I may > be wrong) > Would you ever want to see a base object's prototype properties > automatically? I actually thought you suggested that we wanted to. So what would you do when the prototype chain isn't something like Foo.prototype->Bar.prototype->Object.prototype->null, but more like Foo.prototype->Bar.prototype->null? Do you expand Bar.prototype right away, since Foo.prototype contains only __proto__ or not? It may have more interesting properties than Object.prototype, but it may have a whole lot of them, too. I believe I will agree with anything you suggest, to be honest :-)
(In reply to Panos Astithas [:past] from comment #3) > I actually thought you suggested that we wanted to. So what would you do > when the prototype chain isn't something like > Foo.prototype->Bar.prototype->Object.prototype->null, but more like > Foo.prototype->Bar.prototype->null? Do you expand Bar.prototype right away, > since Foo.prototype contains only __proto__ or not? Yes, I think it's a reasonable assumption that if Foo.prototype contains only __proto__, then it should be expanded. I'm not giving any priority to any kind of prototype, let alone special-casing [object Object] for anything other than stopping the recursion. The algorithm is pretty much: When a node is expanded: 10 wait for the prototype and properties to be fetched 20 if the fetched __proto__ is [object Object], return 30 if there are less than N properties available, expand __proto__ 40 GOTO 10 I don't want to implicitly assume that N should be 1 in the above example (although it's highly possible that it should). For example, go to http://htmlpad.org/debugger/, click me, then expand this.document. It may be good to assume that the __proto__ should be also expanded in that case, since there's not a whole lot of information given just by the [object HTMLDocument] node. Only experimentation will tell :)
(In reply to Victor Porof [:vp] from comment #4) > 30 if there are less than N properties available, expand __proto__ ..of course, only if __proto__ is available :)
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Priority: -- → P3
This bug doesn't make any more sense after bug 870220, where all the important properties that were previously hidden by __proto__s are now displayed on the top level property.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.