#8539 Config preferences backend restructure

This commit is contained in:
Peter Hall 2019-02-14 12:53:59 +00:00
parent 34fda66dfa
commit 8bfd4dc1e2
53 changed files with 1748 additions and 680 deletions

View file

@ -50,7 +50,7 @@ use profile_traits::ipc;
use script_traits::Painter;
use script_traits::{DrawAPaintImageResult, PaintWorkletError};
use servo_atoms::Atom;
use servo_config::prefs::PREFS;
use servo_config::pref;
use servo_url::ServoUrl;
use std::cell::Cell;
use std::collections::hash_map::Entry;
@ -439,10 +439,7 @@ impl PaintWorkletGlobalScope {
.expect("Locking a painter.")
.schedule_a_worklet_task(WorkletTask::Paint(task));
let timeout = PREFS
.get("dom.worklet.timeout_ms")
.as_u64()
.unwrap_or(10u64);
let timeout = pref!(dom.worklet.timeout_ms) as u64;
receiver
.recv_timeout(Duration::from_millis(timeout))