Closed
Bug 340161
Opened 20 years ago
Closed 20 years ago
Browser hang calling window.sidebar.addPanel() in a loop
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 338498
People
(Reporter: carst1, Assigned: mrbkap)
Details
(Keywords: hang, Whiteboard: [sg:low dos])
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Here is a code, which causes Firefox build 20060508, and previous versions to stop responding.
I have checked with other browsers, latest versions of Internet Explorer and Avant, and they don't seem to be affected (except for trying to add a bookmark repeatedly)
Reproducible: Always
Steps to Reproduce:
<html>
<title>Bug</Title>
<body>
<script language="JavaScript1.2" type="text/javascript">
function MainPageBookmark() {title="Bug"; url="http://www.mozilla.com/";
if (window.sidebar) { window.sidebar.addPanel(title, url,"");} else if( window.external )
{ window.external.AddFavorite( url, title); } else if(window.opera && window.print) { return true; }}
for (k=0;k<k+1;k++) MainPageBookmark();
</script>
</body>
Actual Results:
The browser stops responding.
Expected Results:
Well, this is kind of a no-brainer ;)
I didn't create this code myself, but as i wish to help you improve Firefox, i thought i might aswell send it to you.
Comment 1•20 years ago
|
||
Like the setTimeout() spawn bug this loop escapes the "unresponsive script" detection. I never get any of the addPanel dialogs, it's too busy in the loop to open any of them.
Does it escape detection for the same reason the setTimeout() one does or is something else at work here?
Group: security
Status: UNCONFIRMED → NEW
Component: General → XPConnect
Ever confirmed: true
Keywords: hang
Product: Firefox → Core
Summary: Browser stops responding when loading evil bookmark code → Browser hang calling window.sidebar.addPanel() in a loop
Whiteboard: [sg:low dos]
Version: unspecified → 1.8 Branch
Updated•20 years ago
|
Assignee: nobody → dbradley
QA Contact: general → xpconnect
Comment 2•20 years ago
|
||
Not sure about the component here, guessing js-engine but maybe it's DOM.
Assignee: dbradley → mrbkap
Component: XPConnect → JavaScript Engine
Updated•20 years ago
|
QA Contact: xpconnect → general
The code here is exactly the same as the one in bug 338498. I reported this before in bug 301424, which could just as well be made public now.
Comment 4•20 years ago
|
||
*** This bug has been marked as a duplicate of 338498 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•