Closed Bug 137702 Opened 18 years ago Closed 18 years ago

Identified JavaScript (JS) instruction hangs browser

Categories

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

x86
All
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 13350

People

(Reporter: phildoreye, Assigned: jst)

Details

(Keywords: hang)

Attachments

(2 files)

The execution of the following JS instruction makes mozilla 0.9.9 crashes (and 
Netscape 6.22)

var crashGecko = window.document.body.outerHTML;

REMEDIES:
1) Unknown methods of an object must throw an error and not crash the browser.
2) innerHTML is implemented, it's not difficult to add outerHTML.

Small change, big enhancement regarding "Most frequent Bugs" on 
http://bugzilla.mozilla.org/duplicates.cgi

Put a most frequent bug list with respect to the browser version, for instance 
if I've tried mozilla 0.9.9 I do not to see corrected bugs in that version.
I can't produce a testcase which crashes my linux 2002041513 1.0.0 branch build.
Could you attach a testcase and try a recent nightly from
ftp://ftp.mozilla.org/pub/mozilla/nightly/latest
or
ftp://ftp.mozilla.org/pub/mozilla/nightly/latest-1.0.0 ?
Thank you for testing mozilla.
Comment from reporter:
I've downloaded the latest version of mozilla before retesting and it still
crashes.
Included are the files(extract of a long js script) which will crash
mozilla - in IE6 it will just give an JS error.

But before you follow the procedure, could you explain a bit how to use the
JS debugger, because there are still many bugs, which makes both mozilla and
Netscape 6.22 crashes and not IE5.5 or later, nor Opera 6.x, and it's
painstaking to identify them. I can't release you the source file for
licence reasons.

Procedure:
1/ Put the files in the same directory
2/ Execute crashGecko.html
    3/ Select on the check box
    4/ Click the button "save as"
    5/ In the prompt window type something, say 't', and click OK
6/ Now, it remains to kill the application, which hangs forever
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 98 → All
Summary: Identified JavaScript (JS) instruction makes browser crashes → Identified JavaScript (JS) instruction hangs browser
Yup. It hangs my machine alright. Windows NT. Build 2002041408
This has nothing to do with outerHTML. We're hanging because of an infinite
while, the "stop runaway script" dialog doesn't popup. Here's the relevant part
of the script:

	do {
		try {
			strBody = document.body.foo;
		}
		catch (err) {
		}
	} while (strBody == null);

If you remove the line "strBody = document.body.foo;" then the "stop runaway
script" dialog does pop up.
Keywords: hang

*** This bug has been marked as a duplicate of 13350 ***
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.