diff options
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r-- | chrome/renderer/render_view.cc | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 7541ceb..aa8d86d 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1505,13 +1505,9 @@ void RenderView::spellCheck(const WebString& text, #if defined(SPELLCHECKER_IN_RENDERER) string16 word(text); - RenderThread* thread = RenderThread::current(); - // Will be NULL during unit tests. - if (thread) { - RenderThread::current()->spellchecker()->SpellCheckWord( - word.c_str(), word.size(), document_tag_, - &misspelled_offset, &misspelled_length, NULL); - } + RenderThread::current()->spellchecker()->SpellCheckWord( + word.c_str(), word.size(), document_tag_, + &misspelled_offset, &misspelled_length, NULL); #else Send(new ViewHostMsg_SpellCheck(routing_id_, text, document_tag_, &misspelled_offset, &misspelled_length)); @@ -1524,13 +1520,9 @@ WebString RenderView::autoCorrectWord(const WebKit::WebString& word) { if (command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures)) { EnsureDocumentTag(); #if defined(SPELLCHECKER_IN_RENDERER) - RenderThread* thread = RenderThread::current(); - // Will be NULL during unit tests. - if (thread) { - autocorrect_word = - RenderThread::current()->spellchecker()->GetAutoCorrectionWord( - word, document_tag_); - } + autocorrect_word = + RenderThread::current()->spellchecker()->GetAutoCorrectionWord( + word, document_tag_); #else Send(new ViewHostMsg_GetAutoCorrectWord( routing_id_, word, document_tag_, &autocorrect_word)); |