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

Unified Diff: chrome/browser/spellchecker/spellcheck_message_filter.cc

Issue 16075005: Everybody nulls sometimes (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update comment Created 7 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 | « 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/spellchecker/spellcheck_message_filter.cc
diff --git a/chrome/browser/spellchecker/spellcheck_message_filter.cc b/chrome/browser/spellchecker/spellcheck_message_filter.cc
index 66faf230f1d8b7c8aee1edad49b621fe5a7f85b0..4de8b1bde5d08c43ce71554909de0307ab906c5b 100644
--- a/chrome/browser/spellchecker/spellcheck_message_filter.cc
+++ b/chrome/browser/spellchecker/spellcheck_message_filter.cc
@@ -101,9 +101,12 @@ void SpellCheckMessageFilter::OnRespondDocumentMarkers(
const std::vector<uint32>& markers) {
SpellcheckService* spellcheck =
SpellcheckServiceFactory::GetForRenderProcessId(render_process_id_);
- DCHECK(spellcheck);
- spellcheck->GetFeedbackSender()->OnReceiveDocumentMarkers(render_process_id_,
- markers);
+ // Spellcheck service may not be available for a renderer process that is
+ // shutting down.
+ if (!spellcheck)
+ return;
+ spellcheck->GetFeedbackSender()->OnReceiveDocumentMarkers(
+ render_process_id_, markers);
}
#if !defined(OS_MACOSX)
« 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