Bug 233832 - Make WebLockRegistryProxy::processDidExit() return early if process never registered any locks
Summary: Make WebLockRegistryProxy::processDidExit() return early if process never reg...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 232436
  Show dependency treegraph
 
Reported: 2021-12-03 11:27 PST by Chris Dumez
Modified: 2021-12-07 12:12 PST (History)
7 users (show)

See Also:


Attachments
Patch (2.96 KB, patch)
2021-12-03 11:28 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-12-03 11:27:38 PST
Make WebLockRegistryProxy::processDidExit() return early if process never registered any locks.
This avoids calling LocalWebLockRegistry::clientsAreGoingAway() (which can be expensive) in the case we know for sure no locks were registered by this process.
Comment 1 Chris Dumez 2021-12-03 11:28:52 PST
Created attachment 445882 [details]
Patch
Comment 2 Alex Christensen 2021-12-03 11:32:08 PST
Wouldn't m_perOriginRegistries be empty?  I'm not convinced this does anything.
Comment 3 Chris Dumez 2021-12-03 11:33:35 PST
(In reply to Alex Christensen from comment #2)
> Wouldn't m_perOriginRegistries be empty?  I'm not convinced this does
> anything.

Huh? The LocalWebLockRegistry is on the WebsiteDataStore and is thus potentially shared by many WebProcesses. Each WebProcessProxy has its own WebLockRegistryProxy though so I believe this is useful.
Comment 4 Chris Dumez 2021-12-07 11:19:22 PST
Ping review?
Comment 5 EWS 2021-12-07 12:11:15 PST
Committed r286604 (244929@trunk): <https://commits.webkit.org/244929@trunk>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 445882 [details].
Comment 6 Radar WebKit Bug Importer 2021-12-07 12:12:48 PST
<rdar://problem/86169856>