Look at nsIAtom.mHash directly rather than call Gecko_HashAtom.

This commit is contained in:
Cameron McCormack 2016-06-07 17:37:35 +10:00
parent ca26e95e44
commit 0bf1f2793b
7 changed files with 9 additions and 10 deletions

View file

@ -10,9 +10,8 @@ use gecko_bindings::bindings::Gecko_AddRefAtom;
use gecko_bindings::bindings::Gecko_AtomEqualsUTF8IgnoreCase;
use gecko_bindings::bindings::Gecko_Atomize;
use gecko_bindings::bindings::Gecko_GetAtomAsUTF16;
use gecko_bindings::bindings::Gecko_HashAtom;
use gecko_bindings::bindings::Gecko_ReleaseAtom;
use gecko_bindings::bindings::nsIAtom;
use gecko_bindings::structs::nsIAtom;
use heapsize::HeapSizeOf;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::borrow::Cow;
@ -100,7 +99,7 @@ unsafe impl Sync for Atom {}
impl Atom {
pub fn get_hash(&self) -> u32 {
unsafe {
Gecko_HashAtom(self.0)
(*self.0).mHash
}
}