summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 23:48:41 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 23:48:41 +0000
commit18764a1b967de7943184072ae41881f2e8046196 (patch)
tree80382429b7ceda81200f309b2b97b7f6c2a3965c
parent2c1e757bdbdf27f850938e38f2b1fea6cb9f0dc4 (diff)
downloadchromium_src-18764a1b967de7943184072ae41881f2e8046196.zip
chromium_src-18764a1b967de7943184072ae41881f2e8046196.tar.gz
chromium_src-18764a1b967de7943184072ae41881f2e8046196.tar.bz2
Merge 107658 - HistoryBackend: Fix a crash in BroadcastNotification.
This happens when the HistoryService starts closing the backend, and the ExpireHistoryBackend then tries to notify HistoryBackend of a deletion. BUG=101999 TEST=none R=brettw@chromium.org Review URL: http://codereview.chromium.org/8341087 TBR=jhawkins@chromium.org Review URL: http://codereview.chromium.org/8502035 git-svn-id: svn://svn.chromium.org/chrome/branches/912/src@109129 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/history/history_backend.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 45f12ef..d16c6c6 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -2072,8 +2072,10 @@ void HistoryBackend::ProcessDBTask(
void HistoryBackend::BroadcastNotifications(
int type,
HistoryDetails* details_deleted) {
- DCHECK(delegate_.get());
- delegate_->BroadcastNotifications(type, details_deleted);
+ // |delegate_| may be NULL if |this| is in the process of closing (closed by
+ // HistoryService -> HistroyBackend::Closing().
+ if (delegate_.get())
+ delegate_->BroadcastNotifications(type, details_deleted);
}
// Deleting --------------------------------------------------------------------