diff options
author | Hiroyuki Ikezoe <hikezoe@mozilla.com> | 2017-09-21 15:37:50 +0900 |
---|---|---|
committer | Hiroyuki Ikezoe <hikezoe@mozilla.com> | 2017-09-21 15:44:26 +0900 |
commit | dcd959fc72513913c8c7ee06087522db8774e38c (patch) | |
tree | 7d886a5280c4f86314c7791c89a89dac256fb3c5 | |
parent | 5afb1b7dd280b988c6d4bb302d6b9ef77d79de35 (diff) | |
download | servo-dcd959fc72513913c8c7ee06087522db8774e38c.tar.gz servo-dcd959fc72513913c8c7ee06087522db8774e38c.zip |
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.
-rw-r--r-- | components/style/properties/gecko.mako.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index a05a4f7ed7e..1606a2dc0df 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -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() ) } |