mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Streams: remove unnecessary special hanlding of dataclone error (#36628)
This removes a now unnecessary handling of dataclone error when port posts a message handling error to support stream transfers. Fix https://github.com/servo/servo/issues/36479 Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
This commit is contained in:
parent
233c9aaea6
commit
a0419faa85
2 changed files with 7 additions and 19 deletions
|
@ -2088,19 +2088,8 @@ impl CrossRealmTransformReadable {
|
|||
|
||||
// Otherwise, if type is "error",
|
||||
if type_string == "error" {
|
||||
if value.is_undefined() {
|
||||
// Note: for DataClone errors, we send UndefinedValue across,
|
||||
// because somehow sending the error results in another error.
|
||||
// The error is then created here.
|
||||
rooted!(in(*cx) let mut rooted_error = UndefinedValue());
|
||||
Error::DataClone(None).to_jsval(cx, global, rooted_error.handle_mut(), can_gc);
|
||||
|
||||
// Perform ! ReadableStreamDefaultControllerError(controller, value).
|
||||
self.controller.error(rooted_error.handle(), can_gc);
|
||||
} else {
|
||||
// Perform ! ReadableStreamDefaultControllerError(controller, value).
|
||||
self.controller.error(value.handle(), can_gc);
|
||||
}
|
||||
// Perform ! ReadableStreamDefaultControllerError(controller, value).
|
||||
self.controller.error(value.handle(), can_gc);
|
||||
|
||||
// Disentangle port.
|
||||
global.disentangle_port(port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue