[Webkit-unassigned] [Bug 99939] New: should disallow gc/layout/stylerecalc in beforeunload/unload handlers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 21 10:25:12 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=99939

           Summary: should disallow gc/layout/stylerecalc in
                    beforeunload/unload handlers
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Event Handling
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ojan at chromium.org
                CC: eric at webkit.org, beidson at apple.com,
                    fishd at chromium.org, abarth at webkit.org,
                    arv at chromium.org, jamesr at chromium.org,
                    gavinp at chromium.org, mihaip at chromium.org


We should make beforeunload/unload handlers as cheap as possible as they're on the critical path for closing tabs/windows and navigating. I can't think of any use-cases where we'd want to do a gc, layout or style recalc in a beforeunload/unload handler. Other than adding the hooks to disable these things, we'd also need to have hooks to reenable them if the user stays on the page after the beforeunload event.

We might want to do the same for pagehide events?

Not sure how feasible it is to disable these things. Disabling gc seems like it shouldn't be too hard. layout/style-recalc might be harder since they don't always start at the root node.

Are there other things we could disable during these events? Maybe it's time that we kill sync XHR from these events (e.g. just treat them as async).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list