mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Avoid creating a stylo thread pool in e10s parent processes.
MozReview-Commit-ID: LW92yNDKZf4
This commit is contained in:
parent
12607531d8
commit
d2842daa2d
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