diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs index aa79140e0440..c2e5dd65e223 100644 --- a/components/servo_arc/lib.rs +++ b/components/servo_arc/lib.rs @@ -182,7 +182,7 @@ impl Arc { // FIXME(emilio): Would be so amazing to have // std::intrinsics::type_name() around, so that we could also report // a real size. - NS_LogCtor(ptr as *const _, b"ServoArc\0".as_ptr() as *const _, 8); + NS_LogCtor(ptr as *mut _, b"ServoArc\0".as_ptr() as *const _, 8); } unsafe { @@ -315,7 +315,7 @@ impl Arc { #[cfg(feature = "gecko_refcount_logging")] unsafe { NS_LogDtor( - self.ptr() as *const _, + self.ptr() as *mut _, b"ServoArc\0".as_ptr() as *const _, 8, ); @@ -355,12 +355,12 @@ impl Arc { #[cfg(feature = "gecko_refcount_logging")] extern "C" { fn NS_LogCtor( - aPtr: *const std::os::raw::c_void, + aPtr: *mut std::os::raw::c_void, aTypeName: *const std::os::raw::c_char, aSize: u32, ); fn NS_LogDtor( - aPtr: *const std::os::raw::c_void, + aPtr: *mut std::os::raw::c_void, aTypeName: *const std::os::raw::c_char, aSize: u32, ); @@ -762,7 +762,7 @@ impl Arc> { if !is_static { // FIXME(emilio): Would be so amazing to have // std::intrinsics::type_name() around. - NS_LogCtor(ptr as *const _, b"ServoArc\0".as_ptr() as *const _, 8) + NS_LogCtor(ptr as *mut _, b"ServoArc\0".as_ptr() as *const _, 8) } } diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs index 8f255898fc87..c52b7874a70b 100644 --- a/components/style/rule_tree/mod.rs +++ b/components/style/rule_tree/mod.rs @@ -950,8 +950,8 @@ mod gecko_leak_checking { use std::os::raw::{c_char, c_void}; extern "C" { - pub fn NS_LogCtor(aPtr: *const c_void, aTypeName: *const c_char, aSize: u32); - pub fn NS_LogDtor(aPtr: *const c_void, aTypeName: *const c_char, aSize: u32); + fn NS_LogCtor(aPtr: *mut c_void, aTypeName: *const c_char, aSize: u32); + fn NS_LogDtor(aPtr: *mut c_void, aTypeName: *const c_char, aSize: u32); } static NAME: &'static [u8] = b"RuleNode\0"; @@ -960,7 +960,7 @@ mod gecko_leak_checking { pub fn log_ctor(ptr: *const RuleNode) { let s = NAME as *const [u8] as *const u8 as *const c_char; unsafe { - NS_LogCtor(ptr as *const c_void, s, size_of::() as u32); + NS_LogCtor(ptr as *mut c_void, s, size_of::() as u32); } } @@ -968,7 +968,7 @@ mod gecko_leak_checking { pub fn log_dtor(ptr: *const RuleNode) { let s = NAME as *const [u8] as *const u8 as *const c_char; unsafe { - NS_LogDtor(ptr as *const c_void, s, size_of::() as u32); + NS_LogDtor(ptr as *mut c_void, s, size_of::() as u32); } }