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):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.