Index: src/runtime/runtime-strings.cc |
diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc |
index 393e18fbf0bc2694dfde76f0b33c2ba63a45c963..2d515c2bc3b12a40c904c6610e6d9565fe8f580f 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) { |