[whatwg/webidl] ObservableArray's "set the length"'s behavior with empty backing lists (Issue #1049)

https://webidl.spec.whatwg.org/#observable-array-exotic-object-set-the-length says:

> * Let oldLen be handler.[[BackingList]]'s size.
> * If uint32Len > oldLen, then return false.
> * Let indexToDelete be oldLen − 1.
> * While indexToDelete ≥ uint32Len:

What's the expected behavior when `handler.[[BackingList]]` is empty? Does `indexToDelete` become -1 or is it unsigned? Should there be a check for this specific case that causes the algorithm to abort early, or should it also return false when `uint32Len == oldLen`?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1049

Received on Tuesday, 19 October 2021 10:02:38 UTC