Auto merge of #20222 - upsuper:chrome-thread-pool, r=bholley

Do not disable thread pool in the parent process

This is the Servo side change of [bug 1375913](https://bugzilla.mozilla.org/show_bug.cgi?id=1375913).

<!-- 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/20222)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-03-06 17:54:34 -05:00 committed by GitHub
commit 3b96fb2cbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View file

@ -1684,9 +1684,6 @@ extern "C" {
extern "C" { extern "C" {
pub fn Gecko_RegisterNamespace(ns: *mut nsAtom) -> i32; pub fn Gecko_RegisterNamespace(ns: *mut nsAtom) -> i32;
} }
extern "C" {
pub fn Gecko_ShouldCreateStyleThreadPool() -> bool;
}
extern "C" { extern "C" {
pub fn Gecko_Construct_Default_nsStyleFont( pub fn Gecko_Construct_Default_nsStyleFont(
ptr: *mut nsStyleFont, ptr: *mut nsStyleFont,

View file

@ -5,7 +5,6 @@
//! Global style data //! Global style data
use context::StyleSystemOptions; use context::StyleSystemOptions;
use gecko_bindings::bindings;
use gecko_bindings::bindings::{Gecko_RegisterProfilerThread, Gecko_UnregisterProfilerThread}; use gecko_bindings::bindings::{Gecko_RegisterProfilerThread, Gecko_UnregisterProfilerThread};
use gecko_bindings::bindings::Gecko_SetJemallocThreadLocalArena; use gecko_bindings::bindings::Gecko_SetJemallocThreadLocalArena;
use num_cpus; use num_cpus;
@ -82,7 +81,7 @@ lazy_static! {
} }
} }
let pool = if num_threads < 1 || unsafe { !bindings::Gecko_ShouldCreateStyleThreadPool() } { let pool = if num_threads < 1 {
None None
} else { } else {
let workers = rayon::ThreadPoolBuilder::new() let workers = rayon::ThreadPoolBuilder::new()