Bug 231549 - Modernize WebDatabaseManagerClient
Summary: Modernize WebDatabaseManagerClient
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-11 20:01 PDT by David Kilzer (:ddkilzer)
Modified: 2021-10-14 11:02 PDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (5.30 KB, patch)
2021-10-11 20:04 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].