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

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: 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 05b2009312576a97e48bd8d84413efacd2c26fbd..6f5d24ca154710ed1c949d1a12df3c75c185ebd1 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -135,10 +135,12 @@ Background.prototype = {
this.setChromeVoxMode(ChromeVoxMode.FORCE_NEXT);
},
+ /** @type {ChromeVoxMode} */
get mode() {
return this.mode_;
},
+ /** @type {cursors.Range} */
get currentRange() {
return this.currentRange_;
},
@@ -595,7 +597,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_ ||
David Tseng 2015/11/17 19:06:25 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