Bug 221627

Summary: Use CompletionHandler instead of ApplicationManifestCallback
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

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>