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

Unified Diff: ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc

Issue 2643853003: ash: fix multiple stack-use-after-scope issues with GetPrimaryDisplay use. (Closed)
Patch Set: Created 3 years, 11 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
Index: ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc
diff --git a/ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc b/ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc
index d40daa8d8adcc3d512d3c2aa7dc6f42a198f1c60..3ae5f22fde3c39a6cd00b69b545b562591324af0 100644
--- a/ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc
+++ b/ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc
@@ -71,7 +71,7 @@ class AshPopupAlignmentDelegateTest : public test::AshTestBase {
}
Position GetPositionInDisplay(const gfx::Point& point) {
- const gfx::Rect& work_area =
+ const gfx::Rect work_area =
sky 2017/01/18 23:33:45 Why do you need the copy here? I can't see how thi
krasin1 2017/01/19 17:36:38 What happens here (before the fix) is the followin
display::Screen::GetScreen()->GetPrimaryDisplay().work_area();
const gfx::Point center_point = work_area.CenterPoint();
if (work_area.x() > point.x() || work_area.y() > point.y() ||

Powered by Google App Engine
This is Rietveld 408576698