Closed Bug 1034352 Opened 10 years ago Closed 10 years ago

html5 worker runs forever - must kill firefox to end

Categories

(Core :: DOM: Workers, defect)

30 Branch
x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1003730

People

(Reporter: duanev, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140605174243

Steps to reproduce:

An html file loads <script src="test.js">; test.js contains a line: var worker = new Worker("thread.js");  thread.js contains:

var i = 0
while (i < 10) {
    console.log(".. " + i);
}

observe Firebug console counting many ".. 0" messages.

Change thread.js to:

var i = 0
while (i < 10) {
    console.log(".. " + i);
    i += 1
}

reload html; log messages .. 0 through .. 9 are observed, as well as previous .. 0 messages which are still being counted.


Actual results:

Once a worker has been created with an infinite loop, the only way to to kill that worker is to kill Firefox via OS commands.  Perhaps this is a feature, but it lends itself to abuse such as resource hogging with possible eventual DoS.  (can the console log be maxed?)


Expected results:

I expected workers created in the context of a web page load or javascript src file load to be cleaned up if that page or script file is reloaded.  Also, if users realize that a page they are visiting is making their browser/machine perform poorly, they need an obvious way to terminate the resource consumption of that page.  Closing the page's tab is the most obvious choice, closing the browser containing the tab should also work; neither kill the worker.  Having to use a command line or the task manager is not obvious.
Group: core-security
Component: Untriaged → DOM: Workers
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.