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 052f3f13131..6fefea60812 100644
--- a/components/script/dom/rtcdatachannel.rs
+++ b/components/script/dom/rtcdatachannel.rs
@@ -135,7 +135,7 @@ impl RTCDataChannel {
pub fn on_error(&self, error: WebRtcError) {
let global = self.global();
- let cx = global.get_cx();
+ let cx = GlobalScope::get_cx();
let _ac = JSAutoRealm::new(*cx, self.reflector().get_jsobject().get());
let init = RTCErrorInit {
errorDetail: RTCErrorDetailType::Data_channel_failure,
@@ -157,7 +157,7 @@ impl RTCDataChannel {
pub fn on_message(&self, channel_message: DataChannelMessage) {
unsafe {
let global = self.global();
- let cx = global.get_cx();
+ let cx = GlobalScope::get_cx();
let _ac = JSAutoRealm::new(*cx, self.reflector().get_jsobject().get());
rooted!(in(*cx) let mut message = UndefinedValue());