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

Unified Diff: extensions/browser/process_manager.cc

Issue 266343002: Unload all apps / extensions when deleting a profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Do not send NULL extension pointer in notifications. Created 6 years, 7 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/ui/browser.cc ('k') | extensions/common/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/process_manager.cc
diff --git a/extensions/browser/process_manager.cc b/extensions/browser/process_manager.cc
index 9e5f0c6561cc25f7785649795275e4402d7f9707..b110aa3b6cf67825049f7aad05795debafb3f6e4 100644
--- a/extensions/browser/process_manager.cc
+++ b/extensions/browser/process_manager.cc
@@ -436,7 +436,10 @@ void ProcessManager::DecrementLazyKeepaliveCount(const Extension* extension) {
void ProcessManager::DecrementLazyKeepaliveCount(
const std::string& extension_id) {
int& count = background_page_data_[extension_id].lazy_keepalive_count;
- DCHECK_GT(count, 0);
+ DCHECK(count > 0 ||
+ !ExtensionRegistry::Get(GetBrowserContext())
+ ->enabled_extensions()
+ .Contains(extension_id));
// If we reach a zero keepalive count when the lazy background page is about
// to be closed, incrementing close_sequence_id will cancel the close
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | extensions/common/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698