mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibJS: Convert create_data_property_or_throw() to ThrowCompletionOr
This commit is contained in:
parent
bb2499cd7a
commit
364dd42fc8
30 changed files with 148 additions and 167 deletions
|
@ -40,7 +40,8 @@ Array* Array::create_from(GlobalObject& global_object, Vector<Value> const& elem
|
|||
// 4. For each element e of elements, do
|
||||
for (u32 n = 0; n < elements.size(); ++n) {
|
||||
// a. Perform ! CreateDataPropertyOrThrow(array, ! ToString(𝔽(n)), e).
|
||||
array->create_data_property_or_throw(n, elements[n]);
|
||||
MUST(array->create_data_property_or_throw(n, elements[n]));
|
||||
|
||||
// b. Set n to n + 1.
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue