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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js

Issue 1458463002: Add some missing null checks in chromevox next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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 | chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index 4c04953b4c4de4423ef5c1fad28d83138dc4043f..8db4d02391c23ff7a623580b2cd259c9d992357b 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -134,10 +134,12 @@ Background.prototype = {
this.setChromeVoxMode(ChromeVoxMode.FORCE_NEXT);
},
+ /** @type {ChromeVoxMode} */
get mode() {
return this.mode_;
},
+ /** @type {cursors.Range} */
get currentRange() {
return this.currentRange_;
},
@@ -606,7 +608,8 @@ Background.prototype = {
} else {
// When in compat mode, if the focus is within the desktop tree proper,
// then do not disable content scripts.
- if (this.currentRange_.start.node.root.role == 'desktop')
+ if (this.currentRange_ &&
+ this.currentRange_.start.node.root.role == RoleType.desktop)
return;
this.disableClassicChromeVox_();
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698