diff options
author | mark <mark@chromium.org> | 2015-10-20 11:36:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-20 18:37:12 +0000 |
commit | da902e18a4d31bc1d1534f85ab6cf30b4c4bcdfc (patch) | |
tree | d7e4440cd4ef743e4302ee7908a921be0e2b1ec2 /base/time | |
parent | 220c73916470009f4b408fc15aa91fa5bf8d0df8 (diff) | |
download | chromium_src-da902e18a4d31bc1d1534f85ab6cf30b4c4bcdfc.zip chromium_src-da902e18a4d31bc1d1534f85ab6cf30b4c4bcdfc.tar.gz chromium_src-da902e18a4d31bc1d1534f85ab6cf30b4c4bcdfc.tar.bz2 |
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.
Review URL: https://codereview.chromium.org/1411523006
Cr-Commit-Position: refs/heads/master@{#355112}
Diffstat (limited to 'base/time')
-rw-r--r-- | base/time/time_mac.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/time/time_mac.cc b/base/time/time_mac.cc index 1dbbc33..8983ab2 100644 --- a/base/time/time_mac.cc +++ b/base/time/time_mac.cc @@ -83,7 +83,7 @@ int64_t ComputeThreadTicks() { } kern_return_t kr = thread_info( - thread, + thread.get(), THREAD_BASIC_INFO, reinterpret_cast<thread_info_t>(&thread_info_data), &thread_info_count); |