HTMLCollection.namedItem() crashs if item does not exist

VERIFIED FIXED

Status

()

Core
DOM: Core & HTML
--
critical
VERIFIED FIXED
17 years ago
9 years ago

People

(Reporter: Andreas M. "Clarence" Schneider, Assigned: jst)

Tracking

({crash})

Trunk
x86
Windows NT
crash
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [XPCDOM])

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
This crashs on submit:

<form onsubmit="alert(this.elements.namedItem('x'))">
<input type=submit value=crash>
</form>

2001-04-15-20, Win NT.
(Reporter)

Comment 1

17 years ago
Created attachment 31107 [details]
testcase
(Reporter)

Updated

17 years ago
Keywords: crash
(Assignee)

Comment 2

17 years ago
tested with todays build on Win2k, WORKSFORME, please reopen if you still see
this crash.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 3

17 years ago
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.
(Reporter)

Comment 4

17 years ago
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 → ---
(Reporter)

Comment 5

17 years ago
Created attachment 31725 [details]
dr watson log
(Reporter)

Comment 6

17 years ago
Reproduced the crash with a talkback build (2001-05-02). ID is TB29944524X.
Severity: major → critical

Comment 7

17 years ago
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
(Assignee)

Comment 8

17 years ago
This appears to be fixed in the XPCDOM builds, the XPCDOM changes will most
likely land tuesday, next week.
Whiteboard: [XPCDOM]
(Assignee)

Comment 9

17 years ago
Fixed.
Status: REOPENED → RESOLVED
Last Resolved: 17 years ago17 years ago
Resolution: --- → FIXED
(Reporter)

Comment 10

17 years ago
Verified. 2001-05-12-08, Win NT.
Status: RESOLVED → VERIFIED

Updated

9 years ago
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.