mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Use Atom::from(nsIAtom) to increment reference count in case of dynamic atom for will-change.
If we don't increment the reference count for the Atom in servo side, it's possible to try to release the Atom in servo side even if we have already released in gecko side. When it happens, nsIAtom::mKind is no longer reliable.
This commit is contained in:
parent
5afb1b7dd2
commit
dcd959fc72
1 changed files with 1 additions and 4 deletions
|
@ -3482,7 +3482,6 @@ fn static_assert() {
|
|||
pub fn clone_will_change(&self) -> longhands::will_change::computed_value::T {
|
||||
use properties::longhands::will_change::computed_value::T;
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use gecko_string_cache::Atom;
|
||||
use values::CustomIdent;
|
||||
|
||||
if self.gecko.mWillChange.mBuffer.len() == 0 {
|
||||
|
@ -3490,9 +3489,7 @@ fn static_assert() {
|
|||
} else {
|
||||
T::AnimateableFeatures(
|
||||
self.gecko.mWillChange.mBuffer.iter().map(|gecko_atom| {
|
||||
CustomIdent(
|
||||
unsafe { Atom::from_addrefed(*gecko_atom as *mut nsIAtom) }
|
||||
)
|
||||
CustomIdent((*gecko_atom as *mut nsIAtom).into())
|
||||
}).collect()
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue