mirror of
https://github.com/servo/servo.git
synced 2025-09-05 12:38:21 +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) {
|
if IsArrayBufferObject(*object) || JS_IsArrayBufferViewObject(*object) {
|
||||||
// FIXME:(arihant2math) implement it the correct way (is this correct?)
|
// 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()));
|
return Ok(IndexedDBKeyType::Binary(key.serialized.clone()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
|
|
||||||
[create-index.any.worker.html]
|
[create-index.any.worker.html]
|
||||||
expected: TIMEOUT
|
expected: CRASH
|
||||||
[Assure no crash when populating index]
|
[Assure no crash when populating index]
|
||||||
expected: TIMEOUT
|
expected: TIMEOUT
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
[idb-binary-key-detached.any.html]
|
[idb-binary-key-detached.any.html]
|
||||||
expected: CRASH
|
|
||||||
[Detached ArrayBuffers must throw DataError when used as a key]
|
[Detached ArrayBuffers must throw DataError when used as a key]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -8,7 +7,6 @@
|
||||||
|
|
||||||
|
|
||||||
[idb-binary-key-detached.any.worker.html]
|
[idb-binary-key-detached.any.worker.html]
|
||||||
expected: CRASH
|
|
||||||
[Detached ArrayBuffers must throw DataError when used as a key]
|
[Detached ArrayBuffers must throw DataError when used as a key]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
[IDBFactory.open() - error in version change transaction aborts open]
|
[IDBFactory.open() - error in version change transaction aborts open]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Calling open() with version argument 1.5 should not throw.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Calling open() with version argument undefined should not throw.]
|
[Calling open() with version argument undefined should not throw.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -39,3 +36,6 @@
|
||||||
|
|
||||||
[Calling open() with version argument 9007199254740991 should not throw.]
|
[Calling open() with version argument 9007199254740991 should not throw.]
|
||||||
expected: FAIL
|
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