No bug - Remove dead and unsafe code. r=me
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 25 May 2018 00:51:43 +0200
changeset 419729 a471078b8170ba222ecc2088b90dc3d60cc1f348
parent 419728 69dca4b4848f4e91570f5b378203201247d26c9d
child 419730 635e4b97033680629894d2b18c825f9fd25380f7
push id103605
push userecoal95@gmail.com
push dateThu, 24 May 2018 22:53:49 +0000
treeherdermozilla-inbound@a471078b8170 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
No bug - Remove dead and unsafe code. r=me MozReview-Commit-ID: 9seuLNCJAqz
servo/components/style/gecko_bindings/sugar/ns_com_ptr.rs
--- a/servo/components/style/gecko_bindings/sugar/ns_com_ptr.rs
+++ b/servo/components/style/gecko_bindings/sugar/ns_com_ptr.rs
@@ -8,32 +8,18 @@ use gecko_bindings::structs::nsCOMPtr;
 
 #[cfg(feature = "gecko_debug")]
 impl<T> nsCOMPtr<T> {
     /// Get this pointer as a raw pointer.
     #[inline]
     pub fn raw<U>(&self) -> *mut T {
         self.mRawPtr
     }
-
-    /// Set this pointer from an addrefed raw pointer.
-    /// It leaks the old pointer.
-    #[inline]
-    pub unsafe fn set_raw_from_addrefed<U>(&mut self, ptr: *mut T) {
-        self.mRawPtr = ptr;
-    }
 }
 
 #[cfg(not(feature = "gecko_debug"))]
 impl nsCOMPtr {
     /// Get this pointer as a raw pointer.
     #[inline]
     pub fn raw<T>(&self) -> *mut T {
         self._base.mRawPtr as *mut _
     }
-
-    /// Set this pointer from an addrefed raw pointer.
-    /// It leaks the old pointer.
-    #[inline]
-    pub unsafe fn set_raw_from_addrefed<T>(&mut self, ptr: *mut T) {
-        self._base.mRawPtr = ptr as *mut _;
-    }
 }