Commit a50ef704 authored by jyasskin@chromium.org's avatar jyasskin@chromium.org

Avoid a CHECK in ExtensionActionStorageManager::ReadFromStorage if an extension

has a browser action which it starts reading from storage on startup, but then
it's updated to a new version with no browser action before the callback comes
back.

A better way to fix it would be to block the update until the extension is
"started", but we need better infrastructure to do that.

BUG=349371

Review URL: https://codereview.chromium.org/187323007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255201 0039d316-1c4b-4281-b951-d872f2087c98
parent c7c99f12
...@@ -473,7 +473,12 @@ void ExtensionActionStorageManager::ReadFromStorage( ...@@ -473,7 +473,12 @@ void ExtensionActionStorageManager::ReadFromStorage(
ExtensionAction* browser_action = ExtensionAction* browser_action =
ExtensionActionManager::Get(profile_)->GetBrowserAction(*extension); 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 // 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 // already. The extension may have only updated some of the values, but
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment