mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #18137 - bholley:thread_pool_parent_process, r=upsuper
Avoid creating a stylo thread pool in e10s parent processes Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1375911 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18137) <!-- Reviewable:end -->
This commit is contained in:
commit
489b25004b
2 changed files with 5 additions and 1 deletions
|
@ -1568,6 +1568,9 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Gecko_RegisterNamespace(ns: *mut nsIAtom) -> i32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_ShouldCreateStyleThreadPool() -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_Construct_Default_nsStyleFont(ptr: *mut nsStyleFont,
|
||||
pres_context:
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
//! Global style data
|
||||
|
||||
use context::StyleSystemOptions;
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::bindings::{Gecko_RegisterProfilerThread, Gecko_UnregisterProfilerThread};
|
||||
use gecko_bindings::bindings::Gecko_SetJemallocThreadLocalArena;
|
||||
use num_cpus;
|
||||
|
@ -78,7 +79,7 @@ lazy_static! {
|
|||
}
|
||||
}
|
||||
|
||||
let pool = if num_threads < 1 {
|
||||
let pool = if num_threads < 1 || unsafe { !bindings::Gecko_ShouldCreateStyleThreadPool() } {
|
||||
None
|
||||
} else {
|
||||
let configuration = rayon::Configuration::new()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue