|
mac: Make Mach port scopers better ScopedGenerics
Previously, Pass() did not work correctly for ScopedMachReceiveRight,
ScopedMachSendRight, or ScopedMachPortSet. These were defined as
subclasses of ScopedGeneric<> with appropriate traits types. They did
not have the full range of constructors made available by
ScopedGeneric<>, and their Pass() methods referred to their
ScopedGeneric<> superclass rather than their proper class types.
This changes these scopers to work as ScopedGeneric<> intends, with a
"using" or "typedef" declaration, so that names such as
ScopedMachReceiveRight actually refer to the same type as the underlying
ScopedGeneric<>. This allows Pass() and all other ScopedGeneric<>
functionality to work as intended.
Unfortunately, ScopedGeneric<> doesn't provide a type conversion
operator to the underlying wrapped type, so many use sites need to be
transformed to use the get() accessor. Many existing use sites already
used this accessor.
Committed: https://crrev.com/da902e18a4d31bc1d1534f85ab6cf30b4c4bcdfc
Cr-Commit-Position: refs/heads/master@{#355112}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+74 lines, -77 lines) |
Patch |
|
M |
base/mac/scoped_mach_port.h
|
View
|
|
1 chunk |
+5 lines, -24 lines |
0 comments
|
Download
|
|
M |
base/memory/shared_memory_mac_unittest.cc
|
View
|
1
|
6 chunks |
+8 lines, -6 lines |
0 comments
|
Download
|
|
M |
base/process/process_metrics_mac.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
base/sys_info_ios.mm
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
base/sys_info_mac.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
base/time/time_mac.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/browser/browser_io_surface_manager_mac.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/browser/mach_broker_mac.mm
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/child/child_io_surface_manager_mac.cc
|
View
|
|
4 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
ipc/attachment_broker_mac_unittest.cc
|
View
|
1
|
2 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
ipc/attachment_broker_privileged_mac.cc
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
ipc/attachment_broker_privileged_mac_unittest.cc
|
View
|
1
|
8 chunks |
+33 lines, -23 lines |
0 comments
|
Download
|
|
M |
ipc/attachment_broker_unprivileged_mac.cc
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
sandbox/mac/bootstrap_sandbox.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
sandbox/mac/launchd_interception_server.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
sandbox/mac/xpc_message_server.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 8 (2 generated)
|