Closed Bug 76289 Opened 25 years ago Closed 25 years ago

HTMLCollection.namedItem() crashs if item does not exist

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows NT
defect
Not set
critical

Tracking

()

VERIFIED FIXED

People

(Reporter: c, Assigned: jst)

Details

(Keywords: crash, Whiteboard: [XPCDOM])

Attachments

(2 files)

This crashs on submit: <form onsubmit="alert(this.elements.namedItem('x'))"> <input type=submit value=crash> </form> 2001-04-15-20, Win NT.
Attached file testcase
Keywords: crash
tested with todays build on Win2k, WORKSFORME, please reopen if you still see this crash.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
Hmm, my build is only 1 day old and I get the crash even in 0.7 and 0.8 (100%). Will test next week with a newer build and either verify or reopen. Reminder to myself to check then too (might be related): <form onsubmit="alert(this.elements.namedItem('radio'))"> <input type=radio name=radio value=a>A <input type=radio name=radio value=b>B <input type=submit value=test> </form> This prints "[object HTMLCollection]", but should return a single node. There might be a conflict between DOM0 and DOM2.
Reopening. Still crashes with 2001-04-20-21-trunk (installer), Win NT 4.0, SP 6a. I have tried with a new profile, crashes 100% for me.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Attached file dr watson log
Reproduced the crash with a talkback build (2001-05-02). ID is TB29944524X.
Severity: major → critical
Confirming crash with buildID 2001050404 win2k. Adding mozilla1.0 keyword nomination. DOM1 HTML (http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html.html#ID-1019015399) spec says "Return Value The Node with a name or id attribute whose value corresponds to the specified string. Upon failure (e.g., no node with this name exists), returns null."
Keywords: mozilla1.0
This appears to be fixed in the XPCDOM builds, the XPCDOM changes will most likely land tuesday, next week.
Whiteboard: [XPCDOM]
Fixed.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Verified. 2001-05-12-08, Win NT.
Status: RESOLVED → VERIFIED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: desale → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: