mirror of
https://github.com/servo/servo.git
synced 2025-09-03 03:28:20 +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()));
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
[create-index.any.worker.html]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Assure no crash when populating index]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[idb-binary-key-detached.any.html]
|
||||
expected: CRASH
|
||||
[Detached ArrayBuffers must throw DataError when used as a key]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -8,7 +7,6 @@
|
|||
|
||||
|
||||
[idb-binary-key-detached.any.worker.html]
|
||||
expected: CRASH
|
||||
[Detached ArrayBuffers must throw DataError when used as a key]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
[IDBFactory.open() - error in version change transaction aborts open]
|
||||
expected: FAIL
|
||||
|
||||
[Calling open() with version argument 1.5 should not throw.]
|
||||
expected: FAIL
|
||||
|
||||
[Calling open() with version argument undefined should not throw.]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -39,3 +36,6 @@
|
|||
|
||||
[Calling open() with version argument 9007199254740991 should not throw.]
|
||||
expected: FAIL
|
||||
|
||||
[Calling open() with version argument 1.5 should not throw.]
|
||||
expected: FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue