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

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp

Issue 2749153003: Add null position check in SpellChecker::findFirstMisspelling (Closed)
Patch Set: Wed Mar 15 11:10:41 PDT 2017 Created 3 years, 9 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 | third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4371ed59c482a569009a567a77cff31b4a478775..27ae01b469ee1bcd7552b7758d107ab3ae2a253d 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -1158,6 +1158,9 @@ std::pair<String, int> SpellChecker::findFirstMisspelling(const Position& start,
break;
VisiblePosition newParagraphStart =
startOfNextParagraph(createVisiblePosition(paragraphEnd));
+ if (newParagraphStart.isNull())
+ break;
+
paragraphStart = newParagraphStart.toParentAnchoredPosition();
paragraphEnd = endOfParagraph(newParagraphStart).toParentAnchoredPosition();
firstIteration = false;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698