servo: Merge #20222 - Do not disable thread pool in the parent process (from upsuper:chrome-thread-pool); r=bholley

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 3b96fb2cbe8754b30646e8bd914806048c0b6db2

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 0adb8753d1c45b6a089f758bc9e5217aaec749cd
This commit is contained in:
Xidorn Quan 2018-03-06 17:54:34 -05:00
Родитель 41e05df804
Коммит 1ea1f8f175
2 изменённых файлов: 1 добавлений и 5 удалений

Просмотреть файл

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

Просмотреть файл

@ -5,7 +5,6 @@
//! 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;
@ -82,7 +81,7 @@ lazy_static! {
}
}
let pool = if num_threads < 1 || unsafe { !bindings::Gecko_ShouldCreateStyleThreadPool() } {
let pool = if num_threads < 1 {
None
} else {
let workers = rayon::ThreadPoolBuilder::new()