Chromium Code Reviews| Index: runtime/lib/regexp.cc |
| diff --git a/runtime/lib/regexp.cc b/runtime/lib/regexp.cc |
| index 00088b5b0253c38e8962eabf9b607e61080b9ba1..7054257bea660287579020e258c380e64e5141bb 100644 |
| --- a/runtime/lib/regexp.cc |
| +++ b/runtime/lib/regexp.cc |
| @@ -12,19 +12,10 @@ |
| namespace dart { |
| -static void CheckAndThrowExceptionIfNull(const Instance& obj) { |
| - if (obj.IsNull()) { |
| - GrowableArray<const Object*> args; |
| - Exceptions::ThrowByType(Exceptions::kNullPointer, args); |
| - } |
| -} |
| - |
| DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_factory, 4) { |
| ASSERT(AbstractTypeArguments::CheckedHandle( |
| arguments->NativeArgAt(0)).IsNull()); |
| - const Instance& arg1 = Instance::CheckedHandle(arguments->NativeArgAt(1)); |
| - CheckAndThrowExceptionIfNull(arg1); |
|
Lasse Reichstein Nielsen
2012/11/19 15:02:48
Was this code actually necessary to test for getti
regis
2012/11/19 19:45:31
I am not familiar with this code. The first argume
|
| GET_NATIVE_ARGUMENT(String, pattern, arguments->NativeArgAt(1)); |
| GET_NATIVE_ARGUMENT(Instance, handle_multi_line, arguments->NativeArgAt(2)); |
| GET_NATIVE_ARGUMENT(Instance, handle_ignore_case, arguments->NativeArgAt(3)); |
| @@ -75,8 +66,6 @@ DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_getGroupCount, 1) { |
| DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_ExecuteMatch, 3) { |
| const JSRegExp& regexp = JSRegExp::CheckedHandle(arguments->NativeArgAt(0)); |
| ASSERT(!regexp.IsNull()); |
| - const Instance& arg1 = Instance::CheckedHandle(arguments->NativeArgAt(1)); |
| - CheckAndThrowExceptionIfNull(arg1); |
| GET_NATIVE_ARGUMENT(String, str, arguments->NativeArgAt(1)); |
| GET_NATIVE_ARGUMENT(Smi, start_index, arguments->NativeArgAt(2)); |
| return Jscre::Execute(regexp, str, start_index.Value()); |