stylo: Don't leak the nsIAtom we get back from Gecko_GetXMLLangValue.

This commit is contained in:
Cameron McCormack 2017-04-05 16:58:39 +08:00
parent f3dcef8c81
commit 581cefccfe

View file

@ -694,7 +694,7 @@ impl<'le> PresentationalHintsSynthetizer for GeckoElement<'le> {
let global_style_data = &*GLOBAL_STYLE_DATA; let global_style_data = &*GLOBAL_STYLE_DATA;
let pdb = PropertyDeclarationBlock::with_one( let pdb = PropertyDeclarationBlock::with_one(
PropertyDeclaration::XLang(SpecifiedLang(Atom::from(ptr))), PropertyDeclaration::XLang(SpecifiedLang(unsafe { Atom::from_addrefed(ptr) })),
Importance::Normal Importance::Normal
); );
let arc = Arc::new(global_style_data.shared_lock.wrap(pdb)); let arc = Arc::new(global_style_data.shared_lock.wrap(pdb));