Changeset 259769 in webkit
- Timestamp:
- Apr 8, 2020, 5:38:27 PM (6 years ago)
- Location:
- branches/safari-610.1.9-branch/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
editing/TextManipulationController.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-610.1.9-branch/Source/WebCore/ChangeLog
r259696 r259769 1 2020-04-08 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r259766. rdar://problem/61487124 4 5 REGRESSION (r258525): Occasional crashes under TextManipulationController::observeParagraphs 6 https://bugs.webkit.org/show_bug.cgi?id=210215 7 <rdar://problem/61362512> 8 9 Reviewed by Darin Adler. 10 11 In the case where `startOfParagraph` or `endOfParagraph` return a null `Position`, we end up crashing under 12 TextManipulationController::observeParagraphs while creating `ParagraphContentIterator`, which expects non-null 13 `Position`s because it dereferences the result of `makeBoundaryPoint`. 14 15 Avoid this crash for now by bailing if either the start or end positions are null. Tests to be added in a 16 followup patch. 17 18 * editing/TextManipulationController.cpp: 19 (WebCore::TextManipulationController::observeParagraphs): 20 21 22 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259766 268f45cc-cd09-0410-ab3c-d52691b4dbfc 23 24 2020-04-08 Wenson Hsieh <wenson_hsieh@apple.com> 25 26 REGRESSION (r258525): Occasional crashes under TextManipulationController::observeParagraphs 27 https://bugs.webkit.org/show_bug.cgi?id=210215 28 <rdar://problem/61362512> 29 30 Reviewed by Darin Adler. 31 32 In the case where `startOfParagraph` or `endOfParagraph` return a null `Position`, we end up crashing under 33 TextManipulationController::observeParagraphs while creating `ParagraphContentIterator`, which expects non-null 34 `Position`s because it dereferences the result of `makeBoundaryPoint`. 35 36 Avoid this crash for now by bailing if either the start or end positions are null. Tests to be added in a 37 followup patch. 38 39 * editing/TextManipulationController.cpp: 40 (WebCore::TextManipulationController::observeParagraphs): 41 1 42 2020-04-07 Alan Coon <alancoon@apple.com> 2 43 -
branches/safari-610.1.9-branch/Source/WebCore/editing/TextManipulationController.cpp
r258525 r259769 240 240 void TextManipulationController::observeParagraphs(const Position& start, const Position& end) 241 241 { 242 if (start.isNull() || end.isNull()) 243 return; 244 242 245 auto document = makeRefPtr(start.document()); 243 246 ASSERT(document);
Note:
See TracChangeset
for help on using the changeset viewer.