summaryrefslogtreecommitdiffstats
path: root/remoting/webapp
diff options
context:
space:
mode:
authorjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-15 06:02:31 +0000
committerjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-15 06:02:31 +0000
commita9a3b59f21d0ae4d1ae10b364adebb5d0649953d (patch)
tree2b9eb41a9423cb15e1a8a2838385c2e4077347c9 /remoting/webapp
parent2a54f2df467d56235e34668ceef8c8625c327e0f (diff)
downloadchromium_src-a9a3b59f21d0ae4d1ae10b364adebb5d0649953d.zip
chromium_src-a9a3b59f21d0ae4d1ae10b364adebb5d0649953d.tar.gz
chromium_src-a9a3b59f21d0ae4d1ae10b364adebb5d0649953d.tar.bz2
Don't throw an exception in Apps v2 at start-up.
chrome.tabs is not available in Apps v2, but the functionality we use it for isn't needed anyway. Rather than throwing a null-pointer exception, log an error message to remind us to remove the code and associated resources once we're fully Apps v2. BUG=121771 Review URL: https://chromiumcodereview.appspot.com/12256043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182627 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp')
-rw-r--r--remoting/webapp/remoting.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js
index 4d3bed1..ac21773 100644
--- a/remoting/webapp/remoting.js
+++ b/remoting/webapp/remoting.js
@@ -365,5 +365,9 @@ function getTabType_(callback) {
chrome.windows.get(tab.windowId, null, windowCallback);
}
};
- chrome.tabs.getCurrent(tabCallback);
+ if (chrome.tabs) {
+ chrome.tabs.getCurrent(tabCallback);
+ } else {
+ console.error('chome.tabs is not available.');
+ }
}