From 6f56b6c848b2d9ee21d0b085b010e91d89785013 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Fri, 19 Jan 2018 13:19:00 -0500 Subject: [PATCH] Bug 1431787 - Mark wr_dec_ref_arc safe to be called by the WebRenderAPI destructor when WR is not built. r=lsalzman a=RyanVM Landing on a CLOSED TREE because this needs to go to beta to fix the build. MozReview-Commit-ID: cSwZ2Bp242 --- gfx/webrender_bindings/src/bindings.rs | 1 + gfx/webrender_bindings/webrender_ffi_generated.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/webrender_bindings/src/bindings.rs b/gfx/webrender_bindings/src/bindings.rs index 7526b4a1f769..d46a5ce3a297 100644 --- a/gfx/webrender_bindings/src/bindings.rs +++ b/gfx/webrender_bindings/src/bindings.rs @@ -2055,6 +2055,7 @@ pub extern "C" fn wr_add_ref_arc(arc: &ArcVecU8) -> *const VecU8 { Arc::into_raw(arc.clone()) } +/// cbindgen:postfix=WR_DESTRUCTOR_SAFE_FUNC #[no_mangle] pub unsafe extern "C" fn wr_dec_ref_arc(arc: *const VecU8) { Arc::from_raw(arc); diff --git a/gfx/webrender_bindings/webrender_ffi_generated.h b/gfx/webrender_bindings/webrender_ffi_generated.h index a0e58229d9d1..1e917ac074e8 100644 --- a/gfx/webrender_bindings/webrender_ffi_generated.h +++ b/gfx/webrender_bindings/webrender_ffi_generated.h @@ -1022,7 +1022,7 @@ WR_FUNC; WR_INLINE void wr_dec_ref_arc(const VecU8 *aArc) -WR_FUNC; +WR_DESTRUCTOR_SAFE_FUNC; WR_INLINE void wr_dp_clear_save(WrState *aState)