Bug 231549

Summary: Modernize WebDatabaseManagerClient
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit Misc.Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1 none

Description David Kilzer (:ddkilzer) 2021-10-11 20:01:43 PDT
Modernize WebDatabaseManagerClient.

Originally I was going to make WebDatabaseManagerClient use a weak observer with CFNotificationCenter, but this isn't needed since it uses a singleton pattern.

So what's left is a bit of clean-up:
- Put WebDatabaseManagerClient in C++ namespace of "WebKit".
- Change WebDatabaseManagerClient::sharedWebDatabaseManagerClient() to use NeverDestroyed<> and to return a reference.
Comment 1 Radar WebKit Bug Importer 2021-10-11 20:02:37 PDT
<rdar://problem/84129168>
Comment 2 David Kilzer (:ddkilzer) 2021-10-11 20:04:34 PDT
Created attachment 440875 [details]
Patch v1
Comment 3 David Kilzer (:ddkilzer) 2021-10-12 11:46:05 PDT
(In reply to David Kilzer (:ddkilzer) from comment #2)
> Created attachment 440875 [details]
> Patch v1

The `api-gtk` failures are likely unrelated to this change as the `gtk` build succeeds.

The WebDatabaseManagerClient class is not used by GTK.
Comment 4 Sihui Liu 2021-10-14 10:21:35 PDT
Comment on attachment 440875 [details]
Patch v1

r=me
Comment 5 EWS 2021-10-14 11:02:32 PDT
Committed r284177 (242994@main): <https://commits.webkit.org/242994@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440875 [details].