Closed Bug 1711740 Opened 4 years ago Closed 2 years ago

Consider interrupting JS to unload displaylists / layers

Categories

(Core :: DOM: Content Processes, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: mconley, Assigned: aiunusov)

References

Details

Attachments

(1 file)

In BrowserChild, we check to see if the parent process has asked the BrowserChild to render layers - and if so, we interrupt JS if it's running to do the paint and upload to the compositor.

We don't, however, do any kind of JS interruption if the parent process has asked the BrowserChild to not render, and to unload layers.

In bug 1711381, Gijs ran into this issue when writing a test that intentionally runs a while(true) {} loop in a content process. We determined that when switching away from a tab in the hung content process, the AsyncTabSwitcher never fired the TabSwitchDone event, because the tab never reached the unloaded state. This is because the compositor was never told to unload its displaylist/layers for the tab, because the associated tab was hung.

We might want to consider interrupting JS to do unloads as well.

See Also: → 1711758
Severity: -- → S3
Priority: -- → P3
Assignee: nobody → aiunusov
Attachment #9312603 - Attachment description: WIP: Bug 1711740 - Consider interrupting JS to unload displaylists / layers, r=smaug → WIP: Bug 1711740, Bug 1813507 - Consider interrupting JS to unload
Attachment #9312603 - Attachment description: WIP: Bug 1711740, Bug 1813507 - Consider interrupting JS to unload → Bug 1711740, Bug 1813507 - Consider interrupting JS to unload
Attachment #9312603 - Attachment description: Bug 1711740, Bug 1813507 - Consider interrupting JS to unload → WIP: Bug 1711740 - Consider interrupting JS to unload layers, r=smaug
Attachment #9312603 - Attachment description: WIP: Bug 1711740 - Consider interrupting JS to unload layers, r=smaug → Bug 1711740 - Consider interrupting JS to unload layers, r=smaug
Attachment #9312603 - Attachment description: Bug 1711740 - Consider interrupting JS to unload layers, r=smaug → WIP: Bug 1711740 - Consider interrupting JS to unload layers, r=smaug

It seems that unload now works correctly:
https://share.firefox.dev/3Rmwy6O

Attachment #9312603 - Attachment description: WIP: Bug 1711740 - Consider interrupting JS to unload layers, r=smaug → Bug 1711740 - Consider interrupting JS to unload layers, r=smaug
Attachment #9312603 - Attachment description: Bug 1711740 - Consider interrupting JS to unload layers, r=smaug → WIP: Bug 1711740 - Consider interrupting JS to unload layers, r=smaug
Attachment #9312603 - Attachment description: WIP: Bug 1711740 - Consider interrupting JS to unload layers, r=smaug → Bug 1711740 - Consider interrupting JS to unload layers, r=smaug
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/23f20a705af7 Consider interrupting JS to unload layers, r=smaug
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: