Changeset 44169 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
May 26, 2009, 5:33:13 PM (16 years ago)
Author:
[email protected]
Message:

2009-05-26 Gavin Barraclough <[email protected]>

Reviewed by Oliver "pieces of eight" Hunt.

When reseting RegexPattern class, should fully reset the class, not just bits of it.
In particular, we delete the cached character classes (for wordchars, etc), but do
not reset the set of pointers to the cached classes. In the case of a repeated parse
due to an illegal back-reference we will continue to use the deleted character class.

  • yarr/RegexPattern.h: (JSC::Yarr::RegexPattern::reset):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r44163 r44169  
     12009-05-26  Gavin Barraclough  <[email protected]>
     2
     3        Reviewed by Oliver "pieces of eight" Hunt.
     4
     5        When reseting RegexPattern class, should fully reset the class, not just bits of it.
     6        In particular, we delete the cached character classes (for wordchars, etc), but do
     7        not reset the set of pointers to the cached classes.  In the case of a repeated parse
     8        due to an illegal back-reference we will continue to use the deleted character class.
     9
     10        * yarr/RegexPattern.h:
     11        (JSC::Yarr::RegexPattern::reset):
     12
    1132009-05-26  Brent Fulgham  <[email protected]>
    214
  • trunk/JavaScriptCore/yarr/RegexPattern.h

    r42853 r44169  
    264264        m_maxBackReference = 0;
    265265
     266        newlineCached = 0;
     267        digitsCached = 0;
     268        spacesCached = 0;
     269        wordcharCached = 0;
     270        nondigitsCached = 0;
     271        nonspacesCached = 0;
     272        nonwordcharCached = 0;
     273
    266274        deleteAllValues(m_disjunctions);
    267275        m_disjunctions.clear();
Note: See TracChangeset for help on using the changeset viewer.