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

Unified Diff: content/browser/accessibility/browser_accessibility_manager.cc

Issue 1261073003: Tolerate GetRoot() returning null. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | content/browser/accessibility/browser_accessibility_manager_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility_manager.cc
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc
index 6aaf25575c926e45dda8026e5b6519a93dbd7bb0..9a42dc169e7e897158a10536b0199d580b9c56f4 100644
--- a/content/browser/accessibility/browser_accessibility_manager.cc
+++ b/content/browser/accessibility/browser_accessibility_manager.cc
@@ -129,7 +129,9 @@ ui::AXTreeUpdate BrowserAccessibilityManager::GetEmptyDocument() {
}
BrowserAccessibility* BrowserAccessibilityManager::GetRoot() {
- return GetFromAXNode(tree_->root());
+ // tree_->root() can be null during AXTreeDelegate callbacks.
+ ui::AXNode* root = tree_->root();
+ return root ? GetFromAXNode(root) : nullptr;
}
BrowserAccessibility* BrowserAccessibilityManager::GetFromAXNode(
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698