Index: src/runtime/runtime-strings.cc |
diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc |
index f5bda59b26fe9316b02aecdd80b3b60742876a8b..76e13cb5283a1608fbb3bd22329b389d42a6e188 100644 |
--- a/src/runtime/runtime-strings.cc |
+++ b/src/runtime/runtime-strings.cc |
@@ -90,17 +90,8 @@ RUNTIME_FUNCTION(Runtime_StringReplaceOneCharWithString) { |
RUNTIME_FUNCTION(Runtime_StringIndexOf) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 3); |
- |
- CONVERT_ARG_HANDLE_CHECKED(String, sub, 0); |
- CONVERT_ARG_HANDLE_CHECKED(String, pat, 1); |
- CONVERT_ARG_HANDLE_CHECKED(Object, index, 2); |
- |
- uint32_t start_index = 0; |
- if (!index->ToArrayIndex(&start_index)) return Smi::FromInt(-1); |
- |
- CHECK(start_index <= static_cast<uint32_t>(sub->length())); |
- int position = String::IndexOf(isolate, sub, pat, start_index); |
- return Smi::FromInt(position); |
+ return String::IndexOf(isolate, args.at<Object>(0), |
+ args.at<Object>(1), args.at<Object>(2)); |
} |
RUNTIME_FUNCTION(Runtime_StringLastIndexOf) { |