Closed
Bug 664184
Opened 14 years ago
Closed 14 years ago
Mistakes in JavaScript Object viewer implementation
Categories
(Other Applications :: DOM Inspector, defect)
Other Applications
DOM Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: crussell, Assigned: crussell)
Details
Attachments
(1 file)
When fixing but 193942, I noticed three things in the new jsObject tree view:
1. isContainerEmpty begins as follows:
> if (!this.isContainer(aIndex)) {
> return true;
> }
This should, of course, return false. This has the effect that after the subject setter calls toggleOpenState, if the subject is a string, the row is expanded to show the string's indexes.
2. JSOV_ToggleOpenState doesn't need to call checkForBadIndex. JSOV_IsContainerEmpty will call isContainer, which will in turn call checkForBadIndex, and if you follow along as the stack then unwinds, you'll notice that it ends up doing the Right Thing.
3. When comparing JSOV_IsContainer to InspectInNewWindowBase_IsInspectable, I noticed that the former doesn't handle null correctly. In fact, baseCommands.js is already in use, so after we check for a bad index, we can just return the result of a call to the latter.
Assignee | ||
Comment 1•14 years ago
|
||
(In reply to comment #0)
> 1. isContainerEmpty begins as follows:
>
> > if (!this.isContainer(aIndex)) {
> > return true;
> > }
>
> This should, of course, return false.
Er, the other way around, I mean. false is what it returns now, true is what it should return.
Attachment #539526 -
Flags: review?(neil)
Updated•14 years ago
|
Attachment #539526 -
Flags: review?(neil) → review+
Assignee | ||
Comment 2•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•