Changeset 38603 in webkit for trunk/JavaScriptCore/runtime/RegExp.cpp
- Timestamp:
- Nov 19, 2008, 1:08:40 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/RegExp.cpp
r38544 r38603 114 114 } 115 115 116 int RegExp::match(const UString& s, int i, OwnArrayPtr<int>* ovector)116 int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector) 117 117 { 118 if ( i< 0)119 i= 0;118 if (startOffset < 0) 119 startOffset = 0; 120 120 if (ovector) 121 121 ovector->clear(); 122 122 123 if ( i> s.size() || s.isNull())123 if (startOffset > s.size() || s.isNull()) 124 124 return -1; 125 125 … … 137 137 ovector->set(offsetVector); 138 138 139 int result = m_wrecFunction(s.data(), i, s.size(), offsetVector);139 int result = m_wrecFunction(s.data(), startOffset, s.size(), offsetVector); 140 140 141 141 if (result < 0) { … … 166 166 } 167 167 168 int numMatches = jsRegExpExecute(m_regExp, reinterpret_cast<const UChar*>(s.data()), s.size(), i, offsetVector, offsetVectorSize);168 int numMatches = jsRegExpExecute(m_regExp, reinterpret_cast<const UChar*>(s.data()), s.size(), startOffset, offsetVector, offsetVectorSize); 169 169 170 170 if (numMatches < 0) {
Note:
See TracChangeset
for help on using the changeset viewer.