[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

adele at apple.com adele at apple.com
Wed Dec 22 15:27:32 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cb3922e00bb61c728d14ad4dc7b01b51432a2761
Author: adele at apple.com <adele at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 3 23:55:30 2010 +0000

    Crashes in WebCore::DocumentMarkerController::removeMarkersFromMarkerMapVectorPair() when deleting multiple lines of text.
    https://bugs.webkit.org/show_bug.cgi?id=48918
    <rdar://problem/8620602>
    
    Patch by Jia Pu <jpu at apple.com> on 2010-11-03
    Reviewed by Darin Adler.
    
    I haven't been able to found a reliable way to reproduce the bug. However, whenever it happens,
    the crash is caused by a null node pointer returned by TextIterator. So it seems to be a
    safe fix to guard against that.
    
    * editing/Editor.cpp: (WebCore::Editor::removeSpellAndCorrectionMarkersFromWordsToBeEdited):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71284 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2da7d81..c7442cc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-03  Jia Pu  <jpu at apple.com>
+
+        Reviewed by Darin Adler.
+
+        Crashes in WebCore::DocumentMarkerController::removeMarkersFromMarkerMapVectorPair() when deleting multiple lines of text.
+        https://bugs.webkit.org/show_bug.cgi?id=48918
+        <rdar://problem/8620602>
+
+        I haven't been able to found a reliable way to reproduce the bug. However, whenever it happens,
+        the crash is caused by a null node pointer returned by TextIterator. So it seems to be a 
+        safe fix to guard against that. 
+
+        * editing/Editor.cpp: (WebCore::Editor::removeSpellAndCorrectionMarkersFromWordsToBeEdited):
+
 2010-11-02  Zhenyao Mo  <zmo at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 22cb7b1..74b165c 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -2537,6 +2537,8 @@ void Editor::removeSpellAndCorrectionMarkersFromWordsToBeEdited(bool doNotRemove
     Vector<RangeMarkerPair, 16> markersToRemove;
     for (TextIterator textIterator(wordRange.get()); !textIterator.atEnd(); textIterator.advance()) {
         Node* node = textIterator.node();
+        if (!node)
+            continue;
         if (node == startOfFirstWord.deepEquivalent().containerNode() || node == endOfLastWord.deepEquivalent().containerNode()) {
             // First word and last word can belong to the same node
             bool processFirstWord = node == startOfFirstWord.deepEquivalent().containerNode() && document->markers()->hasMarkers(rangeOfFirstWord.get(), DocumentMarker::Spelling | DocumentMarker::CorrectionIndicator);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list