Closed Bug 402795 Opened 17 years ago Closed 17 years ago

Stopping tight javascript loops using blocking popups.

Categories

(Firefox :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 61098

People

(Reporter: mike, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

I have noticed that some bogus/malicious sites are starting to have fun and games with alerts, and other blocking popups, wanting you to download some product, just to bug people, or just really bad coding.  I have not discovered a way to break out of these loops, as the close button on the alert just acts as a button is pressed.

basically something like

while (true) alert("blah");

or other kinds of permissions requests in a tight loop.

These can lock up firefox, as you have no way of closing the affected tab, nor the browser itself - only an xkill or the taskmanager in windows can terminate firefox.

I suggest an enhancement which would also be great when developing javascript, which is to add a button to all popup windows which block the browser (or use the close window button), which will terminate the currently running javascript, or disable javascript totally - either option is a good solution.

This would enable users to break out of these kinds of loops, which are either written maliciously to annoy people, or as coding accidents.

I have searched the net for a way to break out of these loop, as they are annoying, however I do not seem to be able to find anything.

Reproducible: Always

Steps to Reproduce:
write a tight javascript loop which opens alerts().
Actual Results:  
Browser is blocked an unusable.

Expected Results:  
The browser blocks when the alert() or requestor is active, blocking the option to close the window, or tab, and closing the requester, just yeilds another requestor.   

The software should give an option to abort the loop.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.