| Index: src/jsregexp.cc
|
| diff --git a/src/jsregexp.cc b/src/jsregexp.cc
|
| index 5fa6cf49d7750689ece45a1dcf67aa36604e7ac9..2ab2d273f08c2535c37c3696f4d440f6ba4038e1 100644
|
| --- a/src/jsregexp.cc
|
| +++ b/src/jsregexp.cc
|
| @@ -236,23 +236,19 @@ MaybeHandle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
|
| }
|
|
|
|
|
| -Handle<Object> RegExpImpl::Exec(Handle<JSRegExp> regexp,
|
| - Handle<String> subject,
|
| - int index,
|
| - Handle<JSArray> last_match_info) {
|
| +MaybeHandle<Object> RegExpImpl::Exec(Handle<JSRegExp> regexp,
|
| + Handle<String> subject,
|
| + int index,
|
| + Handle<JSArray> last_match_info) {
|
| switch (regexp->TypeTag()) {
|
| case JSRegExp::ATOM:
|
| return AtomExec(regexp, subject, index, last_match_info);
|
| case JSRegExp::IRREGEXP: {
|
| - Handle<Object> result =
|
| - IrregexpExec(regexp, subject, index, last_match_info);
|
| - ASSERT(!result.is_null() ||
|
| - regexp->GetIsolate()->has_pending_exception());
|
| - return result;
|
| + return IrregexpExec(regexp, subject, index, last_match_info);
|
| }
|
| default:
|
| UNREACHABLE();
|
| - return Handle<Object>::null();
|
| + return MaybeHandle<Object>();
|
| }
|
| }
|
|
|
| @@ -641,10 +637,10 @@ int RegExpImpl::IrregexpExecRaw(Handle<JSRegExp> regexp,
|
| }
|
|
|
|
|
| -Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> regexp,
|
| - Handle<String> subject,
|
| - int previous_index,
|
| - Handle<JSArray> last_match_info) {
|
| +MaybeHandle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> regexp,
|
| + Handle<String> subject,
|
| + int previous_index,
|
| + Handle<JSArray> last_match_info) {
|
| Isolate* isolate = regexp->GetIsolate();
|
| ASSERT_EQ(regexp->TypeTag(), JSRegExp::IRREGEXP);
|
|
|
| @@ -660,7 +656,7 @@ Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> regexp,
|
| if (required_registers < 0) {
|
| // Compiling failed with an exception.
|
| ASSERT(isolate->has_pending_exception());
|
| - return Handle<Object>::null();
|
| + return MaybeHandle<Object>();
|
| }
|
|
|
| int32_t* output_registers = NULL;
|
| @@ -682,7 +678,7 @@ Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> regexp,
|
| }
|
| if (res == RE_EXCEPTION) {
|
| ASSERT(isolate->has_pending_exception());
|
| - return Handle<Object>::null();
|
| + return MaybeHandle<Object>();
|
| }
|
| ASSERT(res == RE_FAILURE);
|
| return isolate->factory()->null_value();
|
|
|