Index: src/runtime/runtime-strings.cc |
diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc |
index 5704807b82b60a62e0887efce7423d7e4e124ec6..000ae4e0dd0f94726404e6ab0547b2503938123e 100644 |
--- a/src/runtime/runtime-strings.cc |
+++ b/src/runtime/runtime-strings.cc |
@@ -137,7 +137,7 @@ RUNTIME_FUNCTION(Runtime_StringIndexOf) { |
CONVERT_ARG_HANDLE_CHECKED(String, pat, 1); |
CONVERT_ARG_HANDLE_CHECKED(Object, index, 2); |
- uint32_t start_index; |
+ uint32_t start_index = 0; |
if (!index->ToArrayIndex(&start_index)) return Smi::FromInt(-1); |
RUNTIME_ASSERT(start_index <= static_cast<uint32_t>(sub->length())); |
@@ -188,7 +188,7 @@ RUNTIME_FUNCTION(Runtime_StringLastIndexOf) { |
CONVERT_ARG_HANDLE_CHECKED(String, pat, 1); |
CONVERT_ARG_HANDLE_CHECKED(Object, index, 2); |
- uint32_t start_index; |
+ uint32_t start_index = 0; |
if (!index->ToArrayIndex(&start_index)) return Smi::FromInt(-1); |
uint32_t pat_length = pat->length(); |