indexeddb: Return error instead of panicking on structured clone failure (#39078)

Related to failures in #38847

Testing: WPT

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
Ashwin Naren 2025-09-01 18:22:19 -07:00 committed by GitHub
parent ce8b05738c
commit 665ee150a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 7 deletions

View file

@ -145,7 +145,7 @@ pub fn convert_value_to_key(
if IsArrayBufferObject(*object) || JS_IsArrayBufferViewObject(*object) {
// FIXME:(arihant2math) implement it the correct way (is this correct?)
let key = structuredclone::write(cx, input, None).expect("Could not serialize key");
let key = structuredclone::write(cx, input, None)?;
return Ok(IndexedDBKeyType::Binary(key.serialized.clone()));
}