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

Unified Diff: src/runtime.cc

Issue 39186: Revert revisions 1383, 1384, 1391, 1398, 1401, 1402,... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.h ('k') | src/string.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 1426)
+++ src/runtime.cc (working copy)
@@ -858,21 +858,14 @@
static Object* Runtime_RegExpExec(Arguments args) {
HandleScope scope;
- ASSERT(args.length() == 4);
+ ASSERT(args.length() == 3);
CONVERT_CHECKED(JSRegExp, raw_regexp, args[0]);
Handle<JSRegExp> regexp(raw_regexp);
CONVERT_CHECKED(String, raw_subject, args[1]);
Handle<String> subject(raw_subject);
- // Due to the way the JS files are constructed this must be less than the
- // length of a string, i.e. it is always a Smi. We check anyway for security.
- CONVERT_CHECKED(Smi, index, args[2]);
- CONVERT_CHECKED(JSArray, raw_last_match_info, args[3]);
- Handle<JSArray> last_match_info(raw_last_match_info);
- CHECK(last_match_info->HasFastElements());
- Handle<Object> result = RegExpImpl::Exec(regexp,
- subject,
- index->value(),
- last_match_info);
+ Handle<Object> index(args[2]);
+ ASSERT(index->IsNumber());
+ Handle<Object> result = RegExpImpl::Exec(regexp, subject, index);
if (result.is_null()) return Failure::Exception();
return *result;
}
@@ -880,16 +873,12 @@
static Object* Runtime_RegExpExecGlobal(Arguments args) {
HandleScope scope;
- ASSERT(args.length() == 3);
+ ASSERT(args.length() == 2);
CONVERT_CHECKED(JSRegExp, raw_regexp, args[0]);
Handle<JSRegExp> regexp(raw_regexp);
CONVERT_CHECKED(String, raw_subject, args[1]);
Handle<String> subject(raw_subject);
- CONVERT_CHECKED(JSArray, raw_last_match_info, args[2]);
- Handle<JSArray> last_match_info(raw_last_match_info);
- CHECK(last_match_info->HasFastElements());
- Handle<Object> result =
- RegExpImpl::ExecGlobal(regexp, subject, last_match_info);
+ Handle<Object> result = RegExpImpl::ExecGlobal(regexp, subject);
if (result.is_null()) return Failure::Exception();
return *result;
}
« no previous file with comments | « src/runtime.h ('k') | src/string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698