Open Bug 2070937 Opened 3 days ago Updated 2 days ago

A page's scroll handler runs while the debugger is paused

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(firefox-esr115 unaffected, firefox-esr140 wontfix, firefox-esr153 wontfix, firefox156 wontfix, firefox157 wontfix, firefox158 affected)

Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- wontfix
firefox-esr153 --- wontfix
firefox156 --- wontfix
firefox157 --- wontfix
firefox158 --- affected

People

(Reporter: florian, Unassigned)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

With the debugger paused at a debugger statement, scrolling the page runs the page's own onscroll listener to completion instead of deferring it to the resume. Reproduced locally on a debug build with browser_dbg-scroll-run-to-completion.js un-skipped.

EventLoop.preEnter() sets document.pausedByDevTools, and since Bug 1967931 Document::IsRenderingSuppressed() deliberately returns false in that case, so that highlighters and the inspector still work on a paused page. nsRefreshDriver::Tick therefore keeps running every rendering phase for the document, including RenderingPhase::ScrollSteps, which dispatches queued scroll events to page listeners.

A fix would filter the script-running phases out of RunRenderingPhase for a document with PausedByDevTools(), and re-schedule them on resume so the events are deferred rather than dropped. Whether a resumed page gets one catch-up event is Bug 1968387's open question.

:emilio, since you are the author of the regressor, bug 1967931, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)

This is expected, see also this line in the regressing bug.

We can add a knob, but my understanding is that people wanted debugger pauses to still do things like running CSS animations etc. That also runs script.

In general, I'm opposed to whack-a-mole'ing rendering phases in and out of this behavior. Either the rendering is suppressed (with all phases not running) or it isn't.

Flags: needinfo?(emilio)

Set release status flags based on info from the regressing bug 1967931

You need to log in before you can comment on or make changes to this bug.