mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Make GlobalScope.get_cx a static method.
This commit is contained in:
parent
4998c65c42
commit
f79e1e327d
39 changed files with 132 additions and 127 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue