summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-10 18:17:23 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-10 18:17:23 +0000
commit13bbbd19b7e90b1b4c3449f8945aab132eec8767 (patch)
treed0c450d2c2438c899390e7ce96baa106780959c5 /chrome
parent20105cf8e266e4502b9d827c323db1683c0eddb1 (diff)
downloadchromium_src-13bbbd19b7e90b1b4c3449f8945aab132eec8767.zip
chromium_src-13bbbd19b7e90b1b4c3449f8945aab132eec8767.tar.gz
chromium_src-13bbbd19b7e90b1b4c3449f8945aab132eec8767.tar.bz2
Fix 81900: Crash when trying to open the webstore using the Extension App Provider.
BUG=81900 TEST=In the Omnibox, type in 'web store' (without the quotes) and select it. Chrome should not crash. Review URL: http://codereview.chromium.org/6993014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/extension_omnibox_api.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_omnibox_api.cc b/chrome/browser/extensions/extension_omnibox_api.cc
index 1d8a2cc..bf3f7f5 100644
--- a/chrome/browser/extensions/extension_omnibox_api.cc
+++ b/chrome/browser/extensions/extension_omnibox_api.cc
@@ -270,7 +270,12 @@ void LaunchAppFromOmnibox(const AutocompleteMatch& match,
WindowOpenDisposition disposition) {
ExtensionService* service = profile->GetExtensionService();
const Extension* extension =
- service->GetExtensionById(match.destination_url.host(), false);
+ service->GetInstalledApp(match.destination_url);
+ // While the Omnibox popup is open, the extension can be updated, changing
+ // its URL and leaving us with no extension being found. In this case, we
+ // ignore the request.
+ if (!extension)
+ return;
// Look at the preferences to find the right launch container. If no
// preference is set, launch as a regular tab.