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

Unified Diff: chrome/browser/history/history_backend.cc

Issue 8341087: HistoryBackend: Fix a crash in BroadcastNotification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Created 9 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 45f12ef5f54d8f21d8c748a4c79a32152f3a0a58..d16c6c67f6e474aa3a6bae2858f64660445cba2f 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 --------------------------------------------------------------------
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698