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

Unified Diff: ash/content/keyboard_overlay/keyboard_overlay_delegate.cc

Issue 2643853003: ash: fix multiple stack-use-after-scope issues with GetPrimaryDisplay use. (Closed)
Patch Set: one more test case fixed 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
« no previous file with comments | « no previous file | ash/frame/caption_buttons/frame_size_button_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/content/keyboard_overlay/keyboard_overlay_delegate.cc
diff --git a/ash/content/keyboard_overlay/keyboard_overlay_delegate.cc b/ash/content/keyboard_overlay/keyboard_overlay_delegate.cc
index 14af0f50d626e3e2eb882f15b871c666006edac7..bc79aca672bb53bfe9e08d4bc3b1f2cf0fe8ee8c 100644
--- a/ash/content/keyboard_overlay/keyboard_overlay_delegate.cc
+++ b/ash/content/keyboard_overlay/keyboard_overlay_delegate.cc
@@ -78,10 +78,9 @@ views::Widget* KeyboardOverlayDelegate::Show(views::WebDialogView* view) {
// Show the widget at the bottom of the work area.
gfx::Size size;
GetDialogSize(&size);
- const gfx::Rect& rect =
- display::Screen::GetScreen()
- ->GetDisplayNearestWindow(widget_->GetNativeView())
- .work_area();
+ const gfx::Rect rect = display::Screen::GetScreen()
+ ->GetDisplayNearestWindow(widget_->GetNativeView())
+ .work_area();
gfx::Rect bounds(rect.x() + (rect.width() - size.width()) / 2,
rect.y() + (rect.height() - size.height()) / 2, size.width(),
size.height());
« no previous file with comments | « no previous file | ash/frame/caption_buttons/frame_size_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698