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

Unified Diff: ui/views/window/dialog_delegate.cc

Issue 2355963002: Avert crash in ExtensionInstalledBubbleView::GetWindowTitle triggered (Closed)
Patch Set: further up the chain Created 4 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: ui/views/window/dialog_delegate.cc
diff --git a/ui/views/window/dialog_delegate.cc b/ui/views/window/dialog_delegate.cc
index d98274cde71a90871a5fd96875f70838ca61cb3f..81f636723102cb125094045070ea489f5d154ff3 100644
--- a/ui/views/window/dialog_delegate.cc
+++ b/ui/views/window/dialog_delegate.cc
@@ -255,7 +255,10 @@ View* DialogDelegateView::GetContentsView() {
}
void DialogDelegateView::GetAccessibleState(ui::AXViewState* state) {
- state->name = GetWindowTitle();
+ // This may be called by screen readers after the window is closed.
+ // See crbug.com/648280
+ if (!GetWidget()->IsClosed())
+ state->name = GetWindowTitle();
state->role = ui::AX_ROLE_DIALOG;
}
« 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