Changeset 30647 in webkit


Ignore:
Timestamp:
Feb 28, 2008 10:19:59 AM (16 years ago)
Author:
mitz@apple.com
Message:

Reviewed by Darin Adler.

  • page/mac/FrameMac.mm: (WebCore::Frame::matchLabelsAgainstElement): Added an early return in case the element name is empty.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r30646 r30647  
     12008-02-28  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=17590
     6          ASSERTION FAILED: subject in jsRegExpExecute()
     7
     8        * page/mac/FrameMac.mm:
     9        (WebCore::Frame::matchLabelsAgainstElement): Added an early return in
     10        case the element name is empty.
     11
    1122008-02-28  Justin Garcia  <justin.garcia@apple.com>
    213
  • trunk/WebCore/page/mac/FrameMac.mm

    r30490 r30647  
    297297{
    298298    String name = element->getAttribute(nameAttr);
     299    if (name.isEmpty())
     300        return nil;
     301
    299302    // Make numbers and _'s in field names behave like word boundaries, e.g., "address2"
    300303    replace(name, RegularExpression("\\d"), " ");
    301304    name.replace('_', ' ');
    302    
     305
    303306    RegularExpression* regExp = regExpForLabels(labels);
    304307    // Use the largest match we can find in the whole name string
     
    316319                bestLength = length;
    317320            }
    318             start = pos+1;
     321            start = pos + 1;
    319322        }
    320323    } while (pos != -1);
Note: See TracChangeset for help on using the changeset viewer.