Bug 204377 - Protect MessageReceivers when possible while they are processing incoming IPC messages
Summary: Protect MessageReceivers when possible while they are processing incoming IPC...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-19 14:31 PST by Chris Dumez
Modified: 2019-11-19 16:33 PST (History)
15 users (show)

See Also:


Attachments
Patch (4.71 KB, patch)
2019-11-19 14:33 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (38.35 KB, patch)
2019-11-19 15:09 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-11-19 14:31:39 PST
Protect WebProcessProxy / WebPageProxy while they are processing incoming IPC messages for extra safety.
It is a common mistake to call client delegates and failing to protect |this| while doing so. Client code can destroy the WebProcessProxy / WebPageProxy pretty easily, leading to crashes.
Comment 1 Chris Dumez 2019-11-19 14:33:53 PST
Created attachment 383905 [details]
Patch
Comment 2 Chris Dumez 2019-11-19 14:44:48 PST
Comment on attachment 383905 [details]
Patch

Trying out an alternative proposal from Brady.
Comment 3 Chris Dumez 2019-11-19 15:09:00 PST
Created attachment 383911 [details]
Patch
Comment 4 Chris Dumez 2019-11-19 16:32:26 PST
Comment on attachment 383911 [details]
Patch

Clearing flags on attachment: 383911

Committed r252655: <https://trac.webkit.org/changeset/252655>
Comment 5 Chris Dumez 2019-11-19 16:32:28 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-11-19 16:33:21 PST
<rdar://problem/57341959>