mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08:00
Use new ScopedGeneric move support.
BUG=crashpad:14 R=mark@chromium.org Review URL: https://codereview.chromium.org/1001713002
This commit is contained in:
parent
94f7f9eeb2
commit
995e762a45
@ -216,7 +216,7 @@ bool Settings::WriteSettings(FileHandle handle, const Data& data) {
|
|||||||
bool Settings::RecoverSettings(FileHandle handle, Data* out_data) {
|
bool Settings::RecoverSettings(FileHandle handle, Data* out_data) {
|
||||||
ScopedFileHandle scoped_handle;
|
ScopedFileHandle scoped_handle;
|
||||||
if (handle == kInvalidFileHandle) {
|
if (handle == kInvalidFileHandle) {
|
||||||
scoped_handle.reset(OpenForReadingAndWriting().release());
|
scoped_handle = OpenForReadingAndWriting();
|
||||||
handle = scoped_handle.get();
|
handle = scoped_handle.get();
|
||||||
|
|
||||||
// Test if the file has already been recovered now that the exclusive lock
|
// Test if the file has already been recovered now that the exclusive lock
|
||||||
|
@ -80,7 +80,7 @@ mach_port_t ChildPortHandshake::RunServer() {
|
|||||||
pipe_read_.reset();
|
pipe_read_.reset();
|
||||||
|
|
||||||
// Transfer ownership of the write pipe into this method’s scope.
|
// Transfer ownership of the write pipe into this method’s scope.
|
||||||
base::ScopedFD pipe_write_owner(pipe_write_.release());
|
base::ScopedFD pipe_write_owner = pipe_write_.Pass();
|
||||||
|
|
||||||
// Initialize the token and share it with the client via the pipe.
|
// Initialize the token and share it with the client via the pipe.
|
||||||
token_ = base::RandUint64();
|
token_ = base::RandUint64();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user