Bug 234169 - Darwin const ShareableBitmap::Handle gets invalidated during IPC encoding
Summary: Darwin const ShareableBitmap::Handle gets invalidated during IPC encoding
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Process Model (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matt Woodrow
URL:
Keywords: InRadar
Depends on: 238937
Blocks:
  Show dependency treegraph
 
Reported: 2021-12-10 12:38 PST by Kimmo Kinnunen
Modified: 2023-06-06 22:03 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2021-12-10 12:38:38 PST
const ShareableBitmap::Handle gets invalidated during IPC encoding

.. via SharedMemory::Handle IPC encoding transferring the send right to the receiver.

ShareableBitmap::Handle&&, SharedMemory::Handle&& should be transferred this way

const ShareableBitmap::Handle, const SharedMemory::Handle should be transferred by copying

Otherwise causes bugs when handle is held and sent multiple times, as in bug  231009
Comment 1 Radar WebKit Bug Importer 2021-12-17 12:39:17 PST
<rdar://problem/86646632>
Comment 2 Matt Woodrow 2023-06-04 15:05:40 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14659
Comment 3 EWS 2023-06-06 22:03:12 PDT
Committed 264922@main (6c8a9cf2cbd2): <https://commits.webkit.org/264922@main>

Reviewed commits have been landed. Closing PR #14659 and removing active labels.