Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 30edf579e62234fdd162af7a8ea99c6fb580f0ee..b10495eb3b2d3c0e40adcf5a94148c9dfb0f41eb 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -934,7 +934,7 @@ BUILTIN(ArraySplice) { |
if (start < kMinInt || start > kMaxInt) { |
return CallJsBuiltin(isolate, "ArraySplice", args); |
} |
- relative_start = static_cast<int>(start); |
+ relative_start = std::isnan(start) ? 0 : static_cast<int>(start); |
} else if (!arg1->IsUndefined()) { |
return CallJsBuiltin(isolate, "ArraySplice", args); |
} |