Setting options.length to a negative integer does not throw an exception
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox107 | --- | fixed |
People
(Reporter: ddkilzer, Assigned: lauchmelder23, Mentored)
References
()
Details
(Keywords: good-first-bug, testcase)
Attachments
(2 files)
| Reporter | ||
Comment 1•19 years ago
|
||
| Reporter | ||
Updated•19 years ago
|
Updated•19 years ago
|
Comment 2•19 years ago
|
||
Comment 3•19 years ago
|
||
| Reporter | ||
Comment 4•19 years ago
|
||
Updated•16 years ago
|
Updated•12 years ago
|
Comment 5•7 years ago
|
||
Updated•6 years ago
|
Is this bug still relevant or can it be closed by now?
| Reporter | ||
Comment 7•3 years ago
|
||
(In reply to opi123 from comment #6)
Is this bug still relevant or can it be closed by now?
Did you run the test case on modern web browsers (Safari, Chrome/Edge, Firefox) to see if they agree on compatibility?
If they all "Fail", then there is probably nothing left to do here as MSIE 6 is gone, and modern browsers agree on behavior.
| Reporter | ||
Comment 8•3 years ago
|
||
Safari 15.6 on Mac OS X 12.5 returns: "FAIL No exception thrown".
Safari and Chrome/Edge return "Fail". Only Firefox returns "Pass". This is the opposite of what the bug is for (if I understood that correcty). Is this still a problem then?
Comment 10•3 years ago
|
||
So we follow the WebIDL spec properly, but we have a check for length > 10000, and we throw then. That comes from bug 460713.
Comment 11•3 years ago
|
||
WebKit has the same limit, but just warns, doesn't throw: https://searchfox.org/wubkat/rev/cf0cfbaf1ad7728a145c06e3539170870bbb913f/Source/WebCore/html/HTMLSelectElement.cpp#491
Updated•3 years ago
|
| Assignee | ||
Comment 12•3 years ago
|
||
Hi, I would like to tackle this issue.
I've read through the linked github issue and found this related issue: https://github.com/whatwg/html/issues/8250#issuecomment-1263901046
Under 3.v.a it mentions that the spec will be changed and that the expected behaviour should be to clamp the value and print a warning in the console. So I would go ahead and implement this behaviour.
| Assignee | ||
Comment 13•3 years ago
|
||
Setting options.length to a value greater than 10,000 will now result in the length
being clamped to and a warning being output to the browser console.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 14•3 years ago
|
||
Comment 16•3 years ago
|
||
| bugherder | ||
Description
•