diff options
-rw-r--r-- | chrome/browser/extensions/extension_event_router.cc | 3 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_host.cc | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_event_router.cc b/chrome/browser/extensions/extension_event_router.cc index ab07200..f7050e4 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()); } diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc index fd3a2a3..32a5e25 100644 --- a/chrome/browser/extensions/extension_host.cc +++ b/chrome/browser/extensions/extension_host.cc @@ -159,7 +159,7 @@ ExtensionHost::ExtensionHost(const extensions::Extension* extension, ExtensionHost::~ExtensionHost() { if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE && - extension_->has_lazy_background_page()) { + extension_ && extension_->has_lazy_background_page()) { UMA_HISTOGRAM_LONG_TIMES("Extensions.EventPageActiveTime", since_created_.Elapsed()); } @@ -350,7 +350,7 @@ void ExtensionHost::DidStopLoading() { } if (notify) { if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) { - if (extension_->has_lazy_background_page()) { + if (extension_ && extension_->has_lazy_background_page()) { UMA_HISTOGRAM_TIMES("Extensions.EventPageLoadTime", since_created_.Elapsed()); } else { |