Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
| index fa176f6a239d279acfd1c9a9ded9279efb361b98..2bc9902491fa39febb456a11e7810a95783016bc 100644 |
| --- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
| +++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
| @@ -563,9 +563,17 @@ void SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask |
| void SpellChecker::markAndReplaceFor(SpellCheckRequest* request, const Vector<TextCheckingResult>& results) |
| { |
| TRACE_EVENT0("blink", "SpellChecker::markAndReplaceFor"); |
| - DCHECK(request); |
|
tkent
2016/06/07 23:41:59
Why do you remove the DCHECK?
yosin_UTC9
2016/06/08 04:06:10
Oops, it should be here.
Done.
|
| + if (!frame().selection().isAvailable()) { |
| + // "editing/spelling/spellcheck-async-remove-frame.html" reaches here. |
| + return; |
| + } |
| if (!request->isValid()) |
| return; |
| + if (request->rootEditableElement()->document() != frame().selection().document()) { |
| + // we ignore |request| made for another document. |
| + // "editing/spelling/spellcheck-sequencenum.html" and others reach here. |
| + return; |
| + } |
| TextCheckingTypeMask textCheckingOptions = request->data().mask(); |
| TextCheckingParagraph paragraph(request->checkingRange(), request->paragraphRange()); |