Bug 225478

Summary: Fix crash when WebsiteDataStore is destroyed with outstanding getNetworkProcessConnection request
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   
See Also: https://bugs.webkit.org/show_bug.cgi?id=225486
Attachments:
Description Flags
Patch
none
Patch none

Description Alex Christensen 2021-05-06 13:13:36 PDT
Fix crash when WebsiteDataStore is destroyed with outstanding getNetworkProcessConnection request
Comment 1 Alex Christensen 2021-05-06 13:19:35 PDT
Created attachment 427926 [details]
Patch
Comment 2 Alex Christensen 2021-05-06 13:19:38 PDT
<rdar://problem/77576148>
Comment 3 Chris Dumez 2021-05-06 13:22:03 PDT
Comment on attachment 427926 [details]
Patch

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

r=me

> Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:1725
> +            RunLoop::main().dispatch([weakThis = WTFMove(weakThis), webProcessProxy = WTFMove(webProcessProxy), reply = WTFMove(reply)] () mutable {

We may want to add a comment explaining we're retrying asynchronously because we may be in the middle of destruction.
Comment 4 Alex Christensen 2021-05-06 13:24:09 PDT
Created attachment 427927 [details]
Patch
Comment 5 Alex Christensen 2021-05-06 13:41:04 PDT
r277114