So IIUC bug 1371484 introduced a check [`UINT32_MAX - 2 < uintptr_t(aInput.Length())`](https://searchfox.org/mozilla-central/rev/560b7b1b174ed36912b969eee0c1920f3c59bc56/dom/indexedDB/Key.cpp#562-565). Instead the `nsCString` maximum has been recently [limited by `int32_t`](https://searchfox.org/mozilla-central/rev/560b7b1b174ed36912b969eee0c1920f3c59bc56/xpcom/string/nsTStringRepr.h#67-71), it seems. We should probably align our check also here. Still this limit feels somewhat gigantic for keys, but from a short read I cannot find any hint in the spec about maximum key lengths, so we should probably do our best here.
Bug 1774462 Comment 4 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
So IIUC bug 1371484 introduced a check [`UINT32_MAX - 2 < uintptr_t(aInput.Length())`](https://searchfox.org/mozilla-central/rev/560b7b1b174ed36912b969eee0c1920f3c59bc56/dom/indexedDB/Key.cpp#562-565). Instead the `nsCString` maximum has been recently [limited by `int32_t`](https://searchfox.org/mozilla-central/rev/560b7b1b174ed36912b969eee0c1920f3c59bc56/xpcom/string/nsTStringRepr.h#67-71), it seems. We should probably align our check also here. Still this limit feels somewhat gigantic for keys, but from a short read I cannot find any hint in the spec about maximum key lengths, so we should probably do our best here. Note that in this specific `cmp` case nothing is sent via IPC, I assume, so it would probably even work.