Avoid creating a stylo thread pool in e10s parent processes.

MozReview-Commit-ID: LW92yNDKZf4
This commit is contained in:
Bobby Holley 2017-08-17 09:24:28 -07:00
parent 12607531d8
commit d2842daa2d
2 changed files with 5 additions and 1 deletions

View file

@ -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:

View file

@ -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()