Chromium Code Reviews| Index: src/jsregexp.cc |
| diff --git a/src/jsregexp.cc b/src/jsregexp.cc |
| index d592b0dcd307b8c2b60b0dfde3ea3b79b4d9615f..570370e3b67bec9e915500d750694c9477b411b5 100644 |
| --- a/src/jsregexp.cc |
| +++ b/src/jsregexp.cc |
| @@ -208,9 +208,10 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re, |
| re->set_data(*cached); |
| result = re; |
| } else { |
| - SafeStringInputBuffer buffer(pattern.location()); |
| + pattern->Flatten(shape); |
|
Erik Corry
2008/11/19 09:45:38
Since this shape is only used once I think you sho
|
| RegExpParseResult parse_result; |
| - if (!ParseRegExp(&buffer, &parse_result)) { |
| + FlatStringReader reader(pattern); |
| + if (!ParseRegExp(&reader, &parse_result)) { |
| // Throw an exception if we fail to parse the pattern. |
| ThrowRegExpException(re, |
| pattern, |