Closed Bug 817425 Opened 13 years ago Closed 13 years ago

many id's in devtools debugger listed as undefined

Categories

(DevTools :: Debugger, defect)

19 Branch
x86_64
Windows Vista
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 20

People

(Reporter: mcdavis941.bugs, Assigned: vporof)

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(2 files)

Looking at the DOM of the devtools debugger in DOM Inspector, with Firefox 19, it shows many of the debugger's own elements with id="undefined". I'm sure you would have noticed by now if this were a problem, but it's still a little eyebrow-raising. Screenshot to follow. STR: 1 - Launch Firefox 19. 2 - Visit https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIComponentManager . 3 - Open the debugger for that page. 4 - Select tabzilla.js, set a breakpoint on line 320, the first line of Tabzilla.toggle(). 5 - Click the Tabzilla button (the big Mozilla button at the top of the content page) to trigger the breakpoint. 6 - Open DOM Inspector. 7 - Use DOM Inspector to inspect "this" under Function scope for Tabzilla.toggle in the right pane (variables). 8 - Expand the DOM tree in DOM Inspector, notice many elements have the same id ("undefined").
Attached image screenshot
These are elements created dynamically. Why would they need to have an id?
Attached patch v1Splinter Review
Ah, I see what's happening here. It's the string "undefined", not an undefined value, which is bad. There was a typo in the node creation function. I fixed it and added a test to make sure this won't be an issue again. Thanks for noticing this, mcdavis.
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Attachment #687550 - Flags: review?(past)
Comment on attachment 687550 [details] [diff] [review] v1 Review of attachment 687550 [details] [diff] [review]: ----------------------------------------------------------------- I guess the typo was that you added the underscore and didn't get the getter as a result, right?
Attachment #687550 - Flags: review?(past) → review+
(In reply to Panos Astithas [:past] from comment #4) > Comment on attachment 687550 [details] [diff] [review] > v1 > > Review of attachment 687550 [details] [diff] [review]: > ----------------------------------------------------------------- > > I guess the typo was that you added the underscore and didn't get the getter > as a result, right? Yes. I'm just using the _idString property directly to avoid the getter, since it's part of the same prototype and we're not breaking any privacy conventions.
Whiteboard: [land-in-fx-team]
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: