aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/writablestream.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/writablestream.rs')
-rw-r--r--components/script/dom/writablestream.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/components/script/dom/writablestream.rs b/components/script/dom/writablestream.rs
index da0fe3b5957..1490fc694ef 100644
--- a/components/script/dom/writablestream.rs
+++ b/components/script/dom/writablestream.rs
@@ -8,7 +8,7 @@ use std::mem;
use std::ptr::{self};
use std::rc::Rc;
-use base::id::MessagePortId;
+use base::id::{MessagePortId, MessagePortIndex};
use constellation_traits::MessagePortImpl;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSObject};
@@ -1114,7 +1114,7 @@ impl CrossRealmTransformWritable {
/// <https://streams.spec.whatwg.org/#ws-transfer>
impl Transferable for WritableStream {
- type Id = MessagePortId;
+ type Index = MessagePortIndex;
type Data = MessagePortImpl;
/// <https://streams.spec.whatwg.org/#ref-for-writablestream%E2%91%A0%E2%91%A4>
@@ -1182,7 +1182,9 @@ impl Transferable for WritableStream {
}
/// Note: we are relying on the port transfer, so the data returned here are related to the port.
- fn serialized_storage(data: StructuredData<'_>) -> &mut Option<HashMap<Self::Id, Self::Data>> {
+ fn serialized_storage(
+ data: StructuredData<'_>,
+ ) -> &mut Option<HashMap<MessagePortId, Self::Data>> {
match data {
StructuredData::Reader(r) => &mut r.port_impls,
StructuredData::Writer(w) => &mut w.ports,