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

Unified Diff: chrome/browser/ui/views/tabs/window_finder_win.cc

Issue 1406403007: Eliminate HICON leaks caused by creating icons from bitmap image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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
Index: chrome/browser/ui/views/tabs/window_finder_win.cc
diff --git a/chrome/browser/ui/views/tabs/window_finder_win.cc b/chrome/browser/ui/views/tabs/window_finder_win.cc
index 79897ff3861b9d905a8d9e6fef3e6316684eb819..d0e7b55a88f80d2fff6fcec09bd4d965813363d9 100644
--- a/chrome/browser/ui/views/tabs/window_finder_win.cc
+++ b/chrome/browser/ui/views/tabs/window_finder_win.cc
@@ -109,16 +109,16 @@ class TopMostFinder : public BaseWindowFinder {
}
// hwnd is at the point. Make sure the point is within the windows region.
- if (GetWindowRgn(hwnd, tmp_region_.Get()) == ERROR) {
+ if (GetWindowRgn(hwnd, tmp_region_.get()) == ERROR) {
// There's no region on the window and the window contains the point. Stop
// iterating.
return true;
}
// The region is relative to the window's rect.
- BOOL is_point_in_region = PtInRegion(tmp_region_.Get(),
- screen_loc_.x() - r.left, screen_loc_.y() - r.top);
- tmp_region_ = CreateRectRgn(0, 0, 0, 0);
+ BOOL is_point_in_region = PtInRegion(
+ tmp_region_.get(), screen_loc_.x() - r.left, screen_loc_.y() - r.top);
+ tmp_region_.reset(CreateRectRgn(0, 0, 0, 0));
// Stop iterating if the region contains the point.
return !!is_point_in_region;
}

Powered by Google App Engine
This is Rietveld 408576698