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

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

Issue 173314: Fix "crashed extension" infobar browser crashes. (Closed)
Patch Set: Created 11 years, 4 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 | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/views/extensions/extension_view.h » ('j') | 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 03313660ee1fd67c2e76f6ec967688aa7f01ee7d..377423feeea0a028fff5c4f2dd93abddbb59d15e 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -168,11 +168,13 @@ void ExtensionsService::UpdateExtension(const std::string& id,
}
void ExtensionsService::ReloadExtension(const std::string& extension_id) {
- Extension* extension = GetExtensionById(extension_id);
- FilePath extension_path = extension->path();
+ // Unload the extension if it's loaded.
+ if (GetExtensionById(extension_id))
+ UnloadExtension(extension_id);
- UnloadExtension(extension_id);
- LoadExtension(extension_path);
+ // At this point we have to reconstruct the path from prefs, because
+ // we have no information about this extension in memory.
+ LoadExtension(extension_prefs_->GetExtensionPath(extension_id));
}
void ExtensionsService::UninstallExtension(const std::string& extension_id,
@@ -531,7 +533,6 @@ void ExtensionsService::OnExternalExtensionFound(const std::string& id,
NULL); // no client (silent install)
}
-
// ExtensionsServicesBackend
ExtensionsServiceBackend::ExtensionsServiceBackend(
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/views/extensions/extension_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698