Closed Bug 1400 Opened 26 years ago Closed 26 years ago

script can cause an infinite loop

Categories

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

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: buster, Assigned: vidur)

References

()

Details

Attachments

(1 file)

the following script causes an infinite loop. The superficial cause is the same thead is added to the table twice (once on create, and again on appendChild.) The root cause is nsGenericElement::GetNextSibling() uses IndexOf(mContent), and always returns the index of the first occurance of mContent. So, either the DOM needs to guard against this sort of thing, or content iteration needs to be smarter. table = document.createElement("TABLE"); thead = table.createTHead(); thead.appendChild(currentRow); table.appendChild(thead);
Assignee: kipp → vidur
Component: Content%20Model → DOM
Last I checked, vidur was in charge of the dom (and that includes the content code). I just helped write it :-)
Priority: P1 → P2
I don't think this is a P1, so I'm going to downgrade it. Also, I think this is either a generic content bug or something that table content needs to deal with. I'll hold onto it for now, since it looks like generic content is being palmed off to me. :-)
Status: NEW → ASSIGNED
Setting all current Open Critical and Major to M3
per leger, assigning QA contacts to all open bugs without QA contacts according to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
QA Contact: 4015 → 4141
QA contact re-assigned according to the product areas we're currently working on.
Target Milestone: M3 → M4
moving to m4.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Fixed a while ago. Using the DOM methods, content insertion ensures that a node is removed from its old position before its added to the new one.
Status: RESOLVED → VERIFIED
attempting again to mark as verified.
RCS file: /cvsroot/mozilla/testing/mochitest/tests/test_bug1400.html,v done Checking in test_bug1400.html; /cvsroot/mozilla/testing/mochitest/tests/test_bug1400.html,v <-- test_bug1400.html initial revision: 1.1 done
Flags: in-testsuite+
Attached file Infinite loop
infinite loop
Hi, Bug still present in firefox 9.0.1 VERSION Build identifier: Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 No infinite loop on chrome and opera (tested) To reproduce 1>open file in firefox 9.0.1 2>open web-console(ctrl+shift+k) and check the error
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: