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

Unified Diff: chrome/browser/extensions/extensions_service.cc

Issue 5038004: Fix a browser crash when an extension with multiple active pages crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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/extensions_service.cc
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 05c6768a9d6e3ac6ed15d2559bb06511fa6a36b3..7d5399323b57e42dfae618b1d69953c048848846 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -1392,8 +1392,10 @@ void ExtensionsService::UnloadExtension(const std::string& extension_id) {
scoped_refptr<const Extension> extension(
GetExtensionByIdInternal(extension_id, true, true));
- // Callers should not send us nonexistent extensions.
- CHECK(extension.get());
+ // This method can be called via PostTask, so the extension may have been
+ // unloaded by the time this runs.
+ if (!extension)
+ return;
// Keep information about the extension so that we can reload it later
// even if it's not permanently installed.
« 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