Created attachment 453997 [details]
Testcase (Don't open unless you are prepared to kill your browser!)
A user filed an Adblock Plus bug under https://www.mozdev.org/bugs/show_bug.cgi?id=22955 claiming that Adblock Plus goes into an infinite loop on a particular website and cannot be stopped. What really happened: the website went into an infinite loop and kept creating new DOM nodes. These triggered content policies, with Adblock Plus taking significantly more time than the tight loop that triggered it. Consequently the script that received the blame was pretty much always Adblock Plus. Stopping it didn't help the user because it only affected the current content policies call, not the actual infinite loop.
The issue described by RSnake under http://ha.ckers.org/blog/20100621/firefox-dos/ is similar, there the warning assigns the blame to NoScript rather than the loop that caused the problem.
It is possible to reproduce this issue without any extensions, see testcase. There the endless loop only changes an attribute on the body tag, the script in the DOMAttrModified event handler does much work however. The warning will always blame the DOMAttrModified event handler and suggest stopping it. This doesn't do anything to stop the endless loop however.
Not marking as security sensitive, this kind of attacks has been widely publicized already.
Pretty sure there's an existing bug about the origin tracking on slow script being broken (e.g. through event handlers, etc).
I searched - maybe it has some non-obvious title.
For better dupe-matching, the RSnake demo described above is at
*** Bug 589116 has been marked as a duplicate of this bug. ***
bz, regarding comment 1 (dupe) are you thinking of
bug 78089 "A script on this page is causing mozilla to run slowly" message is too vague and badly worded
Bug 397394 - unresponsive script should identify culpable tab
and bug 573310 states the script itself isn't running long, but the firefox stuff it calls is running too long?
I didn't find anything else. although bug 470765 about improving diag, but is is mostly WFM