Closed
Bug 95119
Opened 23 years ago
Closed 23 years ago
Heavy JS makes Mozilla unresponsive
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: hsivonen, Assigned: rogerl)
References
()
Details
Build ID: 2001081205 FizzillaCFM
Steps to reproduce:
1) Browse pages at http://planetprint.com/ or try the string concatenation test
at chofmann's browser buster.
Actual results:
The infamous color wheel curson shows up and Mozilla doesn't respond to user
input while the script is running.
Expected results:
Expected JS from the Web to not be able to make the UI unresponsive. At least
the stop button should work.
Additional information:
I suppose doing something about this is difficult. However, in the long term, it
would be good if this was fixed. The current situation makes denial of service
attacks possible. A rogue script can make Mozilla unresponsive and the user has
no choice but to zap the entire process.
Comment 1•23 years ago
|
||
Over to JavaScript Engine.
Assignee: asa → rogerl
Component: Browser-General → Javascript Engine
QA Contact: doronr → pschwartau
Comment 2•23 years ago
|
||
The site http://planetprint.com uses layers, which are non-W3C
and not supported by Mozilla/N6.
From http://planetprint.com/dhtmllib.js :
/******************************************************************************
* dhtmllib.js *
* *
* Copyright 1999 by Mike Hall. *
* Web address: http://www.brainjar.com *
* Last update: February 26, 2000. *
* *
* Provides basic functions for DHTML positioned elements which will work on *
* both Netscape Communicator and Internet Explorer browsers (version 4.0 and *
* up). *
******************************************************************************/
// Determine browser.
var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 &&
parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
var isMinIE4 = (document.all) ? 1 : 0;
var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;
//-----------------------------------------------------------------------------
// Layer visibility.
//-----------------------------------------------------------------------------
function hideLayer(layer) {
if (isMinNS4)
layer.visibility = "hide";
if (isMinIE4)
layer.style.visibility = "hidden";
}
function showLayer(layer) {
if (isMinNS4)
layer.visibility = "show";
if (isMinIE4)
layer.style.visibility = "visible";
}
etc.
etc.
And from http://planetprint.com/js/navbar.js :
function navBarCreate() {
if (isMinNS4)
str += '<layer name="navBar' + this.index + '_filler"></layer>\n'
+ '<layer name="navBar' + this.index + '_hdrsBase">\n';
etc.
etc.
Comment 3•23 years ago
|
||
As for the string concatenation issue, that has been filed as:
bug 56940
O(n**2) and O(n**3) growth too easy with JS string concat
Also see:
bug 40391
"JS + on long strings freezes mozilla, horks Win98"
bug 64589
"Recursive Javascript/DOM additions crash browser HARD"
(this turned out to be due to JS string concatenation)
bug 74918
"Appending strings in JavaScript bogs down Mozilla"
*** This bug has been marked as a duplicate of 56940 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Comment 4•23 years ago
|
||
Verified as Duplicate.
I have filed Bug 95148 on the layer issue and cc'ed henris@clinet.fi -
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•