mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Look at nsIAtom.mHash directly rather than call Gecko_HashAtom.
This commit is contained in:
parent
ca26e95e44
commit
0bf1f2793b
7 changed files with 9 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue