bug 1373135 - Mark wr_thread_pool_delete destructor-safe. r=kats
authorNicolas Silva <nsilva@mozilla.com>
Thu, 15 Jun 2017 14:20:12 +0200
changeset 364132 79fbc260febf
parent 364131 914899646cb8
child 364133 f7fdcc27f9d9
push id32033
push userarchaeopteryx@coole-files.de
push date2017-06-15 18:12 +0000
treeherdermozilla-central@75be6742abb9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1373135
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1373135 - Mark wr_thread_pool_delete destructor-safe. r=kats
gfx/webrender_bindings/src/bindings.rs
gfx/webrender_bindings/webrender_ffi_generated.h
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -885,16 +885,17 @@ pub unsafe extern "C" fn wr_thread_pool_
             register_thread_with_profiler(format!("WebRender:Worker#{}", idx));
         });
 
     let workers = Arc::new(rayon::ThreadPool::new(worker_config).unwrap());        
 
     Box::into_raw(Box::new(WrThreadPool(workers)))
 }
 
+/// cbindgen:postfix=WR_DESTRUCTOR_SAFE_FUNC
 #[no_mangle]
 pub unsafe extern "C" fn wr_thread_pool_delete(thread_pool: *mut WrThreadPool) {
     Box::from_raw(thread_pool);
 }
 
 // Call MakeCurrent before this.
 #[no_mangle]
 pub extern "C" fn wr_window_new(window_id: WrWindowId,
--- a/gfx/webrender_bindings/webrender_ffi_generated.h
+++ b/gfx/webrender_bindings/webrender_ffi_generated.h
@@ -931,17 +931,17 @@ WR_DESTRUCTOR_SAFE_FUNC;
 
 WR_INLINE
 WrState* wr_state_new(WrPipelineId aPipelineId,
                       WrSize aContentSize)
 WR_FUNC;
 
 WR_INLINE
 void wr_thread_pool_delete(WrThreadPool *aThreadPool)
-WR_FUNC;
+WR_DESTRUCTOR_SAFE_FUNC;
 
 WR_INLINE
 WrThreadPool* wr_thread_pool_new()
 WR_FUNC;
 
 WR_INLINE
 void wr_vec_u8_free(WrVecU8 aV)
 WR_FUNC;