Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Side by Side Diff: src/jsregexp.h

Issue 42441: Made regexp robust against changes to a string's implementation. (Closed)
Patch Set: Removed unused addition to memory.h Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/jsregexp.cc » ('j') | src/jsregexp.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
Erik Corry 2009/03/20 12:45:42 2009?
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution. 11 // with the distribution.
12 // * Neither the name of Google Inc. nor the names of its 12 // * Neither the name of Google Inc. nor the names of its
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 private: 151 private:
152 static String* last_ascii_string_; 152 static String* last_ascii_string_;
153 static String* two_byte_cached_string_; 153 static String* two_byte_cached_string_;
154 154
155 static bool EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii); 155 static bool EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii);
156 156
157 157
158 // On a successful match, the result is a JSArray containing 158 // On a successful match, the result is a JSArray containing
159 // captured positions. On a failure, the result is the null value. 159 // captured positions. On a failure, the result is the null value.
160 // Returns an empty handle in case of an exception. 160 // Returns an empty handle in case of an exception.
161 static Handle<Object> IrregexpExecOnce(Handle<FixedArray> regexp, 161 static Handle<Object> IrregexpExecOnce(Handle<JSRegExp> jsregexp,
162 int num_captures, 162 int num_captures,
163 Handle<JSArray> lastMatchInfo, 163 Handle<JSArray> lastMatchInfo,
164 Handle<String> subject16, 164 Handle<String> subject16,
165 int previous_index, 165 int previous_index,
166 int* ovector, 166 int* ovector,
167 int ovector_length); 167 int ovector_length);
168 168
169 // Set the subject cache. The previous string buffer is not deleted, so the 169 // Set the subject cache. The previous string buffer is not deleted, so the
170 // caller should ensure that it doesn't leak. 170 // caller should ensure that it doesn't leak.
171 static void SetSubjectCache(String* subject, 171 static void SetSubjectCache(String* subject,
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 Handle<String> pattern, 1379 Handle<String> pattern,
1380 bool is_ascii); 1380 bool is_ascii);
1381 1381
1382 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); 1382 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case);
1383 }; 1383 };
1384 1384
1385 1385
1386 } } // namespace v8::internal 1386 } } // namespace v8::internal
1387 1387
1388 #endif // V8_JSREGEXP_H_ 1388 #endif // V8_JSREGEXP_H_
OLDNEW
« no previous file with comments | « no previous file | src/jsregexp.cc » ('j') | src/jsregexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698