If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

script runtime counter + Enter/LeaveModalState = broken accounting

NEW
Unassigned

Status

()

Core
DOM
7 years ago
7 years ago

People

(Reporter: Dolske, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(blocking2.0 -)

Details

(Whiteboard: DUPEME)

(Reporter)

Description

7 years ago
+++ This bug was initially created as a clone of Bug #563850 +++

Found this issues while working on bug 563850, see comments 2,4,5 for background details.

In a nutshell, a script like:

  while(1) {
    long_computation_that_takes_5_seconds()
    alert("still going!")
  }

Minus the alert and our watchdog timer, this script would peg your CPU and run forever, locking up the browser.

Minus the alert but with the watchdog timer, there should be a slow-script warning dialog shown after ~15 seconds./

With the alert and watch timer, one needs to do some slighty tricky accounting. The script _should_ still terminate after 15 seconds on the CPU, but the time spent waiting for the slow use to interact with the alert() dialog should not be included in this accounting.

Something's broken with our accounting (bug 563850, see comments 2,4,5) -- when the alert dialog is shown, we basically completely forget the existing runtime counters, and allow the loop to execute forever (interrupted by alerts). It should be terminated after 3-4 interations (but _not_ while the alert is shown).
Whiteboard: DUPEME
Yup, this stuff is buggy, but not broken enough to need fixing for 2.0 IMO.
blocking2.0: ? → -
You need to log in before you can comment on or make changes to this bug.