diff options
author | danakj <danakj@chromium.org> | 2014-09-29 11:40:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-29 18:41:04 +0000 |
commit | 514a30a4f290e598ee7e2b00072fe3dad71cbed1 (patch) | |
tree | 47b7922c7814f92325dd5796ea9ee1e4d5b73056 /ash/drag_drop | |
parent | 7d56ae7a00c0952fa695842aa87414c16d2d46e3 (diff) | |
download | chromium_src-514a30a4f290e598ee7e2b00072fe3dad71cbed1.zip chromium_src-514a30a4f290e598ee7e2b00072fe3dad71cbed1.tar.gz chromium_src-514a30a4f290e598ee7e2b00072fe3dad71cbed1.tar.bz2 |
Store the result of Pass() in a local variable.
This makes the use of Pass() similar to how std::move() would be used
to make this code act as it should when using unique_ptr.
R=sky@chromium.org
BUG=418297
Review URL: https://codereview.chromium.org/609083002
Cr-Commit-Position: refs/heads/master@{#297214}
Diffstat (limited to 'ash/drag_drop')
-rw-r--r-- | ash/drag_drop/drag_drop_controller.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc index 21510e7..4242264 100644 --- a/ash/drag_drop/drag_drop_controller.cc +++ b/ash/drag_drop/drag_drop_controller.cc @@ -557,9 +557,9 @@ void DragDropController::Cleanup() { drag_window_->RemoveObserver(this); drag_window_ = NULL; drag_data_ = NULL; - // Cleanup can be called again while deleting DragDropTracker, so use Pass - // instead of reset to avoid double free. - drag_drop_tracker_.Pass(); + // Cleanup can be called again while deleting DragDropTracker, so delete + // the pointer with a local variable to avoid double free. + scoped_ptr<ash::DragDropTracker> holder = drag_drop_tracker_.Pass(); } } // namespace ash |