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

Unified Diff: src/runtime.cc

Issue 12427: Merge regexp2000 back into bleeding_edge (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 830)
+++ src/runtime.cc (working copy)
@@ -288,7 +288,7 @@
static Object* Runtime_RegExpCompile(Arguments args) {
- HandleScope scope; // create a new handle scope
+ HandleScope scope;
ASSERT(args.length() == 3);
CONVERT_CHECKED(JSRegExp, raw_re, args[0]);
Handle<JSRegExp> re(raw_re);
@@ -786,7 +786,9 @@
Handle<String> subject(raw_subject);
Handle<Object> index(args[2]);
ASSERT(index->IsNumber());
- return *RegExpImpl::Exec(regexp, subject, index);
+ Handle<Object> result = RegExpImpl::Exec(regexp, subject, index);
+ if (result.is_null()) return Failure::Exception();
+ return *result;
}
@@ -797,7 +799,9 @@
Handle<JSRegExp> regexp(raw_regexp);
CONVERT_CHECKED(String, raw_subject, args[1]);
Handle<String> subject(raw_subject);
- return *RegExpImpl::ExecGlobal(regexp, subject);
+ Handle<Object> result = RegExpImpl::ExecGlobal(regexp, subject);
+ if (result.is_null()) return Failure::Exception();
+ return *result;
}
@@ -2444,7 +2448,7 @@
// in the buffer
Access<StringInputBuffer> buffer(&string_input_buffer);
buffer->Reset(s);
- unibrow::uchar chars[unibrow::kMaxCaseConvertedSize];
+ unibrow::uchar chars[Converter::kMaxWidth];
int i = 0;
// We can assume that the string is not empty
uc32 current = buffer->GetNext();

Powered by Google App Engine
This is Rietveld 408576698