mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
if ExtendedDOMSlots are used before slots, use FatSlots to have fewer allocations.
Bug: 1419661
This commit is contained in:
parent
8488875a56
commit
6483a89848
1 changed files with 4 additions and 1 deletions
|
@ -651,7 +651,10 @@ impl<'le> GeckoElement<'le> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn extended_slots(&self) -> Option<&structs::FragmentOrElement_nsExtendedDOMSlots> {
|
fn extended_slots(&self) -> Option<&structs::FragmentOrElement_nsExtendedDOMSlots> {
|
||||||
self.dom_slots().and_then(|s| unsafe {
|
self.dom_slots().and_then(|s| unsafe {
|
||||||
(s._base.mExtendedSlots.mPtr as *const structs::FragmentOrElement_nsExtendedDOMSlots)
|
// For the bit usage, see nsContentSlots::GetExtendedSlots.
|
||||||
|
let e_slots = s._base.mExtendedSlots &
|
||||||
|
!structs::nsIContent_nsContentSlots_sNonOwningExtendedSlotsFlag;
|
||||||
|
(e_slots as *const structs::FragmentOrElement_nsExtendedDOMSlots)
|
||||||
.as_ref()
|
.as_ref()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue