Index: src/builtins/builtins-typedarray.cc |
diff --git a/src/builtins/builtins-typedarray.cc b/src/builtins/builtins-typedarray.cc |
index ce534e9b3979887923c94fe3675377d0762331e9..4d609d9b31adbaaea0bbd7d4ff3e83934ee69dd9 100644 |
--- a/src/builtins/builtins-typedarray.cc |
+++ b/src/builtins/builtins-typedarray.cc |
@@ -545,7 +545,7 @@ BUILTIN(TypedArrayPrototypeIncludes) { |
// TODO(cwhan.tunz): throw. See the above comment in CopyWithin. |
if (V8_UNLIKELY(array->WasNeutered())) return isolate->heap()->false_value(); |
- Handle<Object> search_element = args.at<Object>(1); |
+ Handle<Object> search_element = args.atOrUndefined(isolate, 1); |
ElementsAccessor* elements = array->GetElementsAccessor(); |
Maybe<bool> result = elements->IncludesValue(isolate, array, search_element, |
static_cast<uint32_t>(index), |
@@ -576,7 +576,7 @@ BUILTIN(TypedArrayPrototypeIndexOf) { |
// TODO(cwhan.tunz): throw. See the above comment in CopyWithin. |
if (V8_UNLIKELY(array->WasNeutered())) return Smi::FromInt(-1); |
- Handle<Object> search_element = args.at<Object>(1); |
+ Handle<Object> search_element = args.atOrUndefined(isolate, 1); |
ElementsAccessor* elements = array->GetElementsAccessor(); |
Maybe<int64_t> result = elements->IndexOfValue(isolate, array, search_element, |
static_cast<uint32_t>(index), |