[w3c/IndexedDB] Negative counts have inconsistent behavior in getAll()/getAllKeys() (#131)

If you do:

```js
objectStore.getAll(null, -1);
```

Then Chrome 55 will treat the `-1` as equivalent to `Infinity` (AFAICT) whereas Firefox 50 will throw an error:

    TypeError: Value is out of range for unsigned long

This also happens with `getAllKeys()`.

Looking at the spec, it seems undefined what happens when the `count < 0`:

> If count is specified and there are more than count records in range, only the first count will be retrieved.

The Firefox behavior seems most reasonable to me, although it should probably throw some other error since "unsigned long" is leaking an implementation detail.

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

Received on Friday, 23 December 2016 00:48:44 UTC