Bug 1349643 - Loosen thread assertion slightly. r=nical
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 24 Mar 2017 10:07:00 -0400
changeset 397888 8daa3df15945f07753d1fc9ad72d18146d4e2d75
parent 397887 dacaf12d5a5d12d9db177a4b925c0945d268c54b
child 397889 21025b310431b4e6088f10684acd04e751bac605
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1349643
milestone55.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 1349643 - Loosen thread assertion slightly. r=nical When changing the webrender profiler enabled/disabled state, the change propagates to webrender via the main thread. This violates a thread assertion. However, the thread assertion is mostly for documentation, so we can loosen it a little to allow for this scenario. MozReview-Commit-ID: FWfAchQUEUq
gfx/webrender_bindings/src/bindings.rs
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -877,17 +877,17 @@ pub unsafe extern "C" fn wr_api_clear_ro
 
 #[no_mangle]
 pub extern "C" fn wr_api_generate_frame(api: &mut RenderApi) {
     api.generate_frame(None);
 }
 
 #[no_mangle]
 pub extern "C" fn wr_api_send_external_event(api: &mut RenderApi, evt: usize) {
-    assert!(unsafe { is_in_compositor_thread() });
+    assert!(unsafe { !is_in_render_thread() });
 
     api.send_external_event(ExternalEvent::from_raw(evt));
 }
 
 #[no_mangle]
 pub extern "C" fn wr_api_add_raw_font(api: &mut RenderApi,
                                       key: FontKey,
                                       font_buffer: *mut u8,