stylo: Read mName as a raw nsIAtom* from NodeInfoInner.

This commit is contained in:
Ehsan Akhgari 2017-07-24 10:40:58 -04:00
parent 4f0821192c
commit aeb2b8b098
2 changed files with 2 additions and 2 deletions

View file

@ -1665,7 +1665,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
fn get_local_name(&self) -> &WeakAtom {
unsafe {
WeakAtom::new(self.as_node().node_info().mInner.mName.raw::<nsIAtom>())
WeakAtom::new(self.as_node().node_info().mInner.mName)
}
}

View file

@ -94,7 +94,7 @@ unsafe impl Sync for WeakAtom {}
impl WeakAtom {
/// Construct a `WeakAtom` from a raw `nsIAtom`.
#[inline]
pub unsafe fn new<'a>(atom: *mut nsIAtom) -> &'a mut Self {
pub unsafe fn new<'a>(atom: *const nsIAtom) -> &'a mut Self {
&mut *(atom as *mut WeakAtom)
}