| Index: chrome/browser/extensions/extension_service.cc
|
| diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
|
| index db32e5a39c86f6bd2326edeb6d1e80bef818cc13..da17f664bbc18a77662e4e064ab66e7b95eaaddf 100644
|
| --- a/chrome/browser/extensions/extension_service.cc
|
| +++ b/chrome/browser/extensions/extension_service.cc
|
| @@ -2356,6 +2356,7 @@ const Extension* ExtensionService::GetPendingExtensionUpdate(
|
| void ExtensionService::TrackTerminatedExtension(const Extension* extension) {
|
| // No need to check for duplicates; inserting a duplicate is a no-op.
|
| registry_->AddTerminated(make_scoped_refptr(extension));
|
| + extensions_being_terminated_.erase(extension->id());
|
| UnloadExtension(extension->id(), UnloadedExtensionInfo::REASON_TERMINATE);
|
| }
|
|
|
| @@ -2536,6 +2537,11 @@ void ExtensionService::Observe(int type,
|
| extensions::ExtensionHost* host =
|
| content::Details<extensions::ExtensionHost>(details).ptr();
|
|
|
| + // If the extension is already being terminated, there is nothing left to
|
| + // do.
|
| + if (!extensions_being_terminated_.insert(host->extension_id()).second)
|
| + break;
|
| +
|
| // Mark the extension as terminated and Unload it. We want it to
|
| // be in a consistent state: either fully working or not loaded
|
| // at all, but never half-crashed. We do it in a PostTask so
|
|
|