From ad32f40e13fc8845076e3d6644e2be19a76e3bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 15 Jan 2017 17:07:38 +0100 Subject: [PATCH] Bug 1331213: Add an API to drop a nsCSSValue in the stack. r=heycam MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The getter function may create an nsCSSValue with allocated stuff, and we don't want to leak it. MozReview-Commit-ID: DYkUD8CW88E Signed-off-by: Emilio Cobos Álvarez --- components/style/gecko_bindings/bindings.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs index 89089efca0d5..16bfaf40fff5 100644 --- a/components/style/gecko_bindings/bindings.rs +++ b/components/style/gecko_bindings/bindings.rs @@ -750,6 +750,9 @@ extern "C" { pub fn Gecko_CSSValue_GetArrayItem(css_value: nsCSSValueBorrowedMut, index: i32) -> nsCSSValueBorrowedMut; } +extern "C" { + pub fn Gecko_CSSValue_Drop(css_value: nsCSSValueBorrowedMut); +} extern "C" { pub fn Gecko_AddRefCSSValueSharedListArbitraryThread(aPtr: *mut nsCSSValueSharedList);