From a9a3b59f21d0ae4d1ae10b364adebb5d0649953d Mon Sep 17 00:00:00 2001 From: "jamiewalch@chromium.org" Date: Fri, 15 Feb 2013 06:02:31 +0000 Subject: 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 --- remoting/webapp/remoting.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'remoting/webapp') 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.'); + } } -- cgit v1.1