mirror of
https://github.com/servo/servo.git
synced 2025-08-18 03:45:33 +01:00
script: Allow to throw a custom exception on structured cloning (#37948)
The structured cloning with transfer list https://html.spec.whatwg.org/multipage/#structuredserializewithtransfer throws a "DataCloneError" DOM expection by default if serialization/transferral is not possible, but a platform object can throw a custom excepton on its serialization/transfer steps. One example is OffscreenCanvas, which can throw an "InvalidStateError" exception if the context mode is not none on transfer steps. https://html.spec.whatwg.org/multipage/#the-offscreencanvas-interface:transfer-steps Testing: Improvements in the following tests - html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable* Fixes: #37919 Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
parent
cae73341b2
commit
a5b02047f9
10 changed files with 165 additions and 130 deletions
|
@ -1,3 +0,0 @@
|
|||
[offscreencanvas.transferrable.html]
|
||||
[Test that transfer an OffscreenCanvas that already have a 2d context throws exception.]
|
||||
expected: FAIL
|
|
@ -3,8 +3,5 @@
|
|||
[Test that transfer an OffscreenCanvas that has a webgl context throws exception in a worker.]
|
||||
expected: FAIL
|
||||
|
||||
[Test that transfer an OffscreenCanvas that has a 2d context throws exception in a worker.]
|
||||
expected: FAIL
|
||||
|
||||
[Test that transfer an OffscreenCanvas twice throws exception in a worker.]
|
||||
expected: FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue