Bug 257580
Summary: | Make MachSendRight move-only | ||
---|---|---|---|
Product: | WebKit | Reporter: | Matt Woodrow <mattwoodrow> |
Component: | WebKit2 | Assignee: | Matt Woodrow <mattwoodrow> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | kkinnunen, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 257581, 258608 | ||
Bug Blocks: |
Matt Woodrow
MachSendRight are expensive to copy, since it calls into the kernel. We generally don't want to do that by accident.
We should make MachSendRight move-only, and switch callers to use the existing 'copySendRight' function where they do want a duplicate.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Kimmo Kinnunen
This extends to all the handle types that should unify their interface:
UnixFileDescriptor
Win32Handle
MachSendRight
If the copy constructor should be removed, the interface should be the same for all so that generic code can be written.
E.g.
...::copy() or ...::duplicate()
Radar WebKit Bug Importer
<rdar://problem/110431180>
Matt Woodrow
Pull request: https://github.com/WebKit/WebKit/pull/14771
Kimmo Kinnunen
maybe bug 258608 needs to be addressed before landing the patch
EWS
Committed 266327@main (aeb697fb2c06): <https://commits.webkit.org/266327@main>
Reviewed commits have been landed. Closing PR #14771 and removing active labels.