script: Update indexeddb serialization (#38269)

- Dates are now serialized as f64s (like how firefox does it)
- Array buffers are serialized with structured cloning (this is not the
most correct/efficent way to serialize them, however it is currently
better than not supporting array buffers at all)
- Array types are still unimplemented.

Testing: WPT
Fixes: Some panicking

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
Ashwin Naren 2025-07-25 16:41:22 +05:30 committed by GitHub
parent 165ede59cd
commit 3f1e170410
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 276 additions and 86 deletions

View file

@ -22,8 +22,7 @@ pub enum IndexedDBKeyType {
Number(f64),
String(String),
Binary(Vec<u8>),
// FIXME:(arihant2math) Date should not be stored as a Vec<u8>
Date(Vec<u8>),
Date(f64),
Array(Vec<IndexedDBKeyType>),
// FIXME:(arihant2math) implment ArrayBuffer
}