Changeset 55934 in webkit


Ignore:
Timestamp:
Mar 12, 2010 1:16:06 PM (14 years ago)
Author:
barraclough@apple.com
Message:

Bug 36052 - [Qt] REGRESSION(55878) 63 test cases crash

Reviewed by Geoff Garen.

r55878 changed UStringImpl::empty()->characters() to be non-null,
so TextBreakIteratorQt.cpp now should check the length of strings
(previously was assuming all strings with a non-null data pointer
had a length of at least 1).

  • platform/text/qt/TextBreakIteratorQt.cpp:

(WebCore::wordBreakIterator):
(WebCore::characterBreakIterator):
(WebCore::lineBreakIterator):
(WebCore::sentenceBreakIterator):

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r55930 r55934  
     12010-03-12  Gavin Barraclough  <barraclough@apple.com>
     2
     3        Reviewed by Geoff Garen.
     4
     5        Bug 36052 - [Qt] REGRESSION(55878) 63 test cases crash
     6
     7        r55878 changed UStringImpl::empty()->characters() to be non-null,
     8        so TextBreakIteratorQt.cpp now should check the length of strings
     9        (previously was assuming all strings with a non-null data pointer
     10        had a length of at least 1).
     11
     12        * platform/text/qt/TextBreakIteratorQt.cpp:
     13        (WebCore::wordBreakIterator):
     14        (WebCore::characterBreakIterator):
     15        (WebCore::lineBreakIterator):
     16        (WebCore::sentenceBreakIterator):
     17
    1182010-03-12  Dirk Schulze  <krit@webkit.org>
    219
  • trunk/WebCore/platform/text/qt/TextBreakIteratorQt.cpp

    r51174 r55934  
    4141    TextBreakIterator* wordBreakIterator(const UChar* string, int length)
    4242    {
    43         if (!string)
     43        if (!string || !length)
    4444            return 0;
    4545        if (!iterator)
     
    5252    TextBreakIterator* characterBreakIterator(const UChar* string, int length)
    5353    {
    54         if (!string)
     54        if (!string || !length)
    5555            return 0;
    5656        if (!iterator)
     
    6969    {
    7070        static QTextBoundaryFinder *iterator = 0;
    71         if (!string)
     71        if (!string || !length)
    7272            return 0;
    7373        if (!iterator)
     
    8080    TextBreakIterator* sentenceBreakIterator(const UChar* string, int length)
    8181    {
    82         if (!string)
     82        if (!string || !length)
    8383            return 0;
    8484        if (!iterator)
Note: See TracChangeset for help on using the changeset viewer.