Bug 221627 - Use CompletionHandler instead of ApplicationManifestCallback
Summary: Use CompletionHandler instead of ApplicationManifestCallback
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-09 13:59 PST by Alex Christensen
Modified: 2021-02-09 21:23 PST (History)
2 users (show)

See Also:


Attachments
Patch (10.90 KB, patch)
2021-02-09 14:00 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (11.30 KB, patch)
2021-02-09 14:36 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (10.69 KB, patch)
2021-02-09 17:25 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (11.42 KB, patch)
2021-02-09 20:59 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-02-09 13:59:58 PST
Use CompletionHandler instead of ApplicationManifestCallback
Comment 1 Alex Christensen 2021-02-09 14:00:33 PST
Created attachment 419760 [details]
Patch
Comment 2 Chris Dumez 2021-02-09 14:30:54 PST
Comment on attachment 419760 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=419760&action=review

> Source/WebKit/WebProcess/WebPage/WebPage.h:2184
> +    HashMap<uint64_t, CompletionHandler<void(const Optional<WebCore::ApplicationManifest>&)>> m_applicationManifestFetchCallbackMap;

Now that you are storing CompletionHandlers in a data member, you may need to do something in the WebPage destructor to make sure all remaining completion handlers are called before destruction. Otherwise, you may end up with debug assertion hits in some cases.
Comment 3 Alex Christensen 2021-02-09 14:36:25 PST
Created attachment 419768 [details]
Patch
Comment 4 Alex Christensen 2021-02-09 17:25:53 PST
Created attachment 419794 [details]
Patch
Comment 5 Alex Christensen 2021-02-09 20:59:41 PST
Created attachment 419811 [details]
Patch
Comment 6 Alex Christensen 2021-02-09 21:22:50 PST
http://trac.webkit.org/r272637
Comment 7 Radar WebKit Bug Importer 2021-02-09 21:23:12 PST
<rdar://problem/74174444>