aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/rtcdatachannel.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/rtcdatachannel.rs')
-rw-r--r--components/script/dom/rtcdatachannel.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/rtcdatachannel.rs b/components/script/dom/rtcdatachannel.rs
index 7cf42b0f5fc..052f3f13131 100644
--- a/components/script/dom/rtcdatachannel.rs
+++ b/components/script/dom/rtcdatachannel.rs
@@ -85,8 +85,6 @@ impl RTCDataChannel {
binary_type: DomRefCell::new(DOMString::from("blob")),
};
- peer_connection.register_data_channel(servo_media_id, &channel);
-
channel
}
@@ -107,6 +105,8 @@ impl RTCDataChannel {
global,
);
+ peer_connection.register_data_channel(rtc_data_channel.servo_media_id, &*rtc_data_channel);
+
rtc_data_channel
}