mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
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:
parent
ce8b05738c
commit
665ee150a6
4 changed files with 5 additions and 7 deletions
|
@ -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()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue