diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index e135e011bc31af..089daa47f96ec0 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 9 #define V8_MINOR_VERSION 0 #define V8_BUILD_NUMBER 257 -#define V8_PATCH_LEVEL 13 +#define V8_PATCH_LEVEL 16 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/compiler/js-call-reducer.cc b/deps/v8/src/compiler/js-call-reducer.cc index 251ce6ee5a86b9..4bca26bbe0801a 100644 --- a/deps/v8/src/compiler/js-call-reducer.cc +++ b/deps/v8/src/compiler/js-call-reducer.cc @@ -4907,6 +4907,14 @@ Reduction JSCallReducer::ReduceStringPrototypeIndexOf(Node* node) { Node* position = n.Argument(1); new_position = effect = graph()->NewNode( simplified()->CheckSmi(p.feedback()), position, effect, control); + + Node* receiver_length = + graph()->NewNode(simplified()->StringLength(), new_receiver); + new_position = graph()->NewNode( + simplified()->NumberMin(), + graph()->NewNode(simplified()->NumberMax(), new_position, + jsgraph()->ZeroConstant()), + receiver_length); } NodeProperties::ReplaceEffectInput(node, effect); diff --git a/deps/v8/src/debug/debug.cc b/deps/v8/src/debug/debug.cc index c29fb9b7852abd..1e2e18170d52d8 100644 --- a/deps/v8/src/debug/debug.cc +++ b/deps/v8/src/debug/debug.cc @@ -1641,8 +1641,15 @@ Handle Debug::FindSharedFunctionInfoInScript(Handle