mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibJS: Remove OOM handling from TypedArrayGetElement
This commit is contained in:
parent
49f1ef52ad
commit
4c51602437
Notes:
github-actions[bot]
2025-02-05 13:06:11 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/4c516024379 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3450 Reviewed-by: https://github.com/shannonbooth ✅
1 changed files with 2 additions and 2 deletions
|
@ -130,7 +130,7 @@ inline bool is_valid_integer_index(TypedArrayBase const& typed_array, CanonicalI
|
|||
|
||||
// 10.4.5.17 TypedArrayGetElement ( O, index ), https://tc39.es/ecma262/#sec-typedarraygetelement
|
||||
template<typename T>
|
||||
inline ThrowCompletionOr<Value> typed_array_get_element(TypedArrayBase const& typed_array, CanonicalIndex property_index)
|
||||
inline Value typed_array_get_element(TypedArrayBase const& typed_array, CanonicalIndex property_index)
|
||||
{
|
||||
// 1. If IsValidIntegerIndex(O, index) is false, return undefined.
|
||||
if (!is_valid_integer_index(typed_array, property_index))
|
||||
|
@ -238,7 +238,7 @@ public:
|
|||
// b. If numericIndex is not undefined, then
|
||||
if (!numeric_index.is_undefined()) {
|
||||
// i. Let value be TypedArrayGetElement(O, numericIndex).
|
||||
auto value = MUST_OR_THROW_OOM(typed_array_get_element<T>(*this, numeric_index));
|
||||
auto value = typed_array_get_element<T>(*this, numeric_index);
|
||||
|
||||
// ii. If value is undefined, return undefined.
|
||||
if (value.is_undefined())
|
||||
|
|
Loading…
Add table
Reference in a new issue