mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
stylo: Devirtualize nsIAtom refcounting.
Bug: 1362338 Reviewed-by: froydnj MozReview-Commit-ID: 3q5rz3L8quQ
This commit is contained in:
parent
f6aa17add9
commit
4e3ea45325
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ use gecko_bindings::bindings::Gecko_AddRefAtom;
|
||||||
use gecko_bindings::bindings::Gecko_Atomize;
|
use gecko_bindings::bindings::Gecko_Atomize;
|
||||||
use gecko_bindings::bindings::Gecko_Atomize16;
|
use gecko_bindings::bindings::Gecko_Atomize16;
|
||||||
use gecko_bindings::bindings::Gecko_ReleaseAtom;
|
use gecko_bindings::bindings::Gecko_ReleaseAtom;
|
||||||
use gecko_bindings::structs::nsIAtom;
|
use gecko_bindings::structs::{nsIAtom, nsIAtom_AtomKind};
|
||||||
use nsstring::{nsAString, nsString};
|
use nsstring::{nsAString, nsString};
|
||||||
use precomputed_hash::PrecomputedHash;
|
use precomputed_hash::PrecomputedHash;
|
||||||
use std::ascii::AsciiExt;
|
use std::ascii::AsciiExt;
|
||||||
|
@ -149,7 +149,7 @@ impl WeakAtom {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn is_static(&self) -> bool {
|
pub fn is_static(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
(*self.as_ptr()).mIsStatic() != 0
|
(*self.as_ptr()).mKind() == nsIAtom_AtomKind::StaticAtom as u32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue