Closed Bug 233302 Opened 22 years ago Closed 22 years ago

crash when adding too many options to select element via JavaScript

Categories

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

x86
Windows 2000
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: richardtallent, Unassigned)

Details

(Keywords: crash)

Attachments

(1 file)

User-Agent: Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 If you add "too many" options to a <SELECT> element via JavaScript, the browser crashes. Happens whether using "s.options[x]=new Option(txt)" or "s.innerHTML='<option>...'". Length of the option titles does not seem to matter. Reproduced in Firebird 0.7 and latest Firebird 0.8 builds, but DOES NOT exhibit in latest Mozilla build (2004020608). Unfortunately, can't find an option here for a Firebird-only issue Reproducible: Always Steps to Reproduce: <select id="myselect"></select> <script language="JavaScript"> var nextitem; var s = document.getElementById('myselect'); for (j = 0; j < 2000; j++) { nextitem = toCtrl.options.length; s.options[nextitem] = new Option(j); s.options[nextitem].value = j; } </script> Actual Results: *similar* to above (above is untested), Firebird crashes. Expected Results: Not crash, display all additional search options added.
> *similar* to above (above is untested), above doesn't work at all. toCtrl=>s > can't find an option here for a Firebird-only issue Firebird-only issues are filed under the Firebird product (not "Browser"), but this type of bug is usually a Gecko (browser) problem rather than Firebird.
Keywords: crash
Test case works for me(with 200404021008-trunk/Win-2K). Reporter, is this test case cause crash? Are there any difference between my test case and your real case?
Attachment of test case of 2000 options addition in onClick WORKSFORME: Mozilla 1.7b 2004031616 under XP Pro here
Also WFM win98 1.7b
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Component: DOM: HTML → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: