Closed Bug 1956 Opened 26 years ago Closed 26 years ago

xpviewer crashes with invalid appendChild

Categories

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

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: tupshin, Assigned: vidur)

References

Details

1) have an element: child1[i]=document.createElement('div'); 2) create an object: child6 = new Object; 3) have object contain a text node: child6[i]=document.createTextNode('test'); 4) do an append child of the textNode to the element works fine: child1[i].appendChild(child6[i]); 5) attempting an invalid append child with the object itself instead of the textnode crashes browser. It shouldn't work, obviously, but it sure shouldn't crash. child1[id].appendChild(child6); Note that steps four and five are not necessary, but are there for explanatory purposes, and to address the "what the heck are you doing that for" question. It was an accident, but quite hard to debug what was going on when every test crashed the browser.
*** Bug 2026 has been marked as a duplicate of this bug. ***
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Fixed on 1/5/1999. Generic jsval to nsISupports conversion routine now checks for validity of object.
QA Contact: 4248
xpviewer is no more but setting qa contact to reporter for verify against viewer
Hey tupshin, Can you provide an html document with this testcase in it? That would be awesome! Thanks.
test case is at http://www.tupshin.com/domtests/badappendtest1.html 2/8/98 windows build worked did not crash. instead of crashing the console logged: Parameter is not an object. Note that this did not log the line number of the Javascript error(line 16 in the example). Also, I don't believe that the "Parameter is not an object" message is a correct message. It seems to be saying that the parameter(child6) is not an object, but child6 was just created with a "new Object" command, and alert(child6) generates [object Object] to the console. Should these be logged as new bugs, or should the old bug be reopened with a different summary?
QA Contact: 4248 → 4141
Status: RESOLVED → VERIFIED
marking as verified. the bug for #1956 is that the application crashed. Since that is no longer the case, I am closing out this bug and writing a new one specific to the new javascript error.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.