diff options
Diffstat (limited to 'components/script/dom/readablestream.rs')
-rw-r--r-- | components/script/dom/readablestream.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/components/script/dom/readablestream.rs b/components/script/dom/readablestream.rs index bf39c43e923..49e740c6d6e 100644 --- a/components/script/dom/readablestream.rs +++ b/components/script/dom/readablestream.rs @@ -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); |