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

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

Issue 10538041: Add some NULL-checks for ExtensionHost::extension to fix a crash bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « no previous file | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_event_router.cc
diff --git a/chrome/browser/extensions/extension_event_router.cc b/chrome/browser/extensions/extension_event_router.cc
index ab072009a98978ba445a432cb022c3bb4e934f7c..f7050e4c441e3bec63f0830b3451cb4d426a308c 100644
--- a/chrome/browser/extensions/extension_event_router.cc
+++ b/chrome/browser/extensions/extension_event_router.cc
@@ -431,6 +431,9 @@ void ExtensionEventRouter::OnEventAck(
// The event ACK is routed to the background host, so this should never be
// NULL.
CHECK(host);
+ if (!host->extension())
+ return;
+
CHECK(host->extension()->has_lazy_background_page());
pm->DecrementLazyKeepaliveCount(host->extension());
}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698