Chromium Code Reviews| Index: src/runtime.cc |
| =================================================================== |
| --- src/runtime.cc (revision 825) |
| +++ src/runtime.cc (working copy) |
| @@ -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; |
| } |