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

Unified Diff: chrome/browser/extensions/api/extension_action/extension_action_api.cc

Issue 187323007: Avoid a CHECK in ExtensionActionStorageManager::ReadFromStorage if an extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/extension_action/extension_action_api.cc
diff --git a/chrome/browser/extensions/api/extension_action/extension_action_api.cc b/chrome/browser/extensions/api/extension_action/extension_action_api.cc
index a34dc7e3f6324748e4c81c5da0b78df2554d2c54..7d23a1a15078445f5ea633b2671a70f2bdca8174 100644
--- a/chrome/browser/extensions/api/extension_action/extension_action_api.cc
+++ b/chrome/browser/extensions/api/extension_action/extension_action_api.cc
@@ -473,7 +473,12 @@ void ExtensionActionStorageManager::ReadFromStorage(
ExtensionAction* browser_action =
ExtensionActionManager::Get(profile_)->GetBrowserAction(*extension);
- CHECK(browser_action);
+ if (!browser_action) {
+ // This can happen if the extension is updated between startup and when the
+ // storage read comes back, and the update removes the browser action.
+ // http://crbug.com/349371
+ return;
+ }
// Don't load values from storage if the extension has updated a value
// already. The extension may have only updated some of the values, but
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698