Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1688)

Unified Diff: ash/drag_drop/drag_drop_controller.cc

Issue 609083002: Store the result of Pass() in a local variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dragdrop: . Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/drag_drop/drag_drop_controller.cc
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 21510e7f5344ed1110541708b75932b220f34325..4242264493017024527077f55069ff7af0e1c3bb 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698