Closed
Bug 436843
Opened 18 years ago
Closed 16 years ago
crash if javascript has infinite recursion
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: ebaynegs, Unassigned)
References
()
Details
Attachments
(1 file)
|
211 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.9b4) Gecko/2008030714 Firefox/3.0b4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.9b4) Gecko/2008030714 Firefox/3.0b4
the following javascript causes the browser to crash
<script>
var getElementsByClassName = function (classname,tagname) {
if (document.getElementsByClassName)
return getElementsByClassName(classname,tagname);
if(unsafeWindow.Y.U.Dom.getElementsByClassName)
return unsafeWindow.Y.U.Dom.getElementsByClassName(classname,tagname);
else
return false;
}
getElementsByClassName();
</script>
Reproducible: Always
Steps to Reproduce:
1. load test page
Actual Results:
browser crashes
Expected Results:
browser shouldnt crash
actually the test case can be reduced to the following code
<script>
var getElementsByClassName = function (classname,tagname) {
if (document.getElementsByClassName)
return getElementsByClassName(classname,tagname);
}
getElementsByClassName();
</script>
Comment 2•18 years ago
|
||
works for me with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 (Firefox 3 RC2 Candidate), no crash on testurl
Comment 3•18 years ago
|
||
Works for me, Firefox 3.0 RC1 on Linux and MacOSX.
http://www.mozilla.com/firefox/all-rc.html
Error Console says:
Error: too much recursion
Source File: http://steeev.freehostia.com/test/jsbug.htm
Line: 4
Updated•17 years ago
|
Product: Firefox → Core
QA Contact: general → general
Comment 4•16 years ago
|
||
Comment 5•16 years ago
|
||
Infinitely-recursing JavaScript really shouldn't cause a crash. ebaynegs, does it still crash for you in Firefox 3.5?
Summary: crash if page includes specific javascript (getElementsByClassName) → crash if javascript has infinite recursion
Updated•16 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•