aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing/pipeline.rs
diff options
context:
space:
mode:
authorUlf Nilsson <kaksmet@gmail.com>2016-04-09 12:55:24 +0200
committerUlf Nilsson <kaksmet@gmail.com>2016-04-12 09:26:30 +0200
commitd433fb01edb93fd477414970868a535229927c45 (patch)
treec4422f0d5d301ac2843b91b0ea06bc879f3a298a /components/compositing/pipeline.rs
parentf9608022caf7f223dfdfe960c31fb5fe7eb0d1f1 (diff)
downloadservo-d433fb01edb93fd477414970868a535229927c45.tar.gz
servo-d433fb01edb93fd477414970868a535229927c45.zip
Share prefs to content processes
Without this `./mach run -b -- -M` would start fine but navigating to a site would fail with: `thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'assertion failed: mozbrowser_enabled()', /Users/ulf/Documents/Code/servo/components/script/dom/htmliframeelement.rs:163`
Diffstat (limited to 'components/compositing/pipeline.rs')
-rw-r--r--components/compositing/pipeline.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs
index 8c22ce0348b..3a45a486b8a 100644
--- a/components/compositing/pipeline.rs
+++ b/components/compositing/pipeline.rs
@@ -26,6 +26,7 @@ use profile_traits::time;
use script_traits::{ConstellationControlMsg, InitialScriptState, MozBrowserEvent};
use script_traits::{LayoutControlMsg, LayoutMsg, NewLayoutInfo, ScriptMsg};
use script_traits::{ScriptToCompositorMsg, ScriptThreadFactory, TimerEventRequest};
+use std::collections::HashMap;
use std::mem;
use std::sync::mpsc::{Receiver, Sender, channel};
use url::Url;
@@ -33,7 +34,7 @@ use util;
use util::geometry::{PagePx, ViewportPx};
use util::ipc::OptionalIpcSender;
use util::opts::{self, Opts};
-use util::prefs;
+use util::prefs::{self, Pref};
use util::thread;
use webrender_traits;
@@ -232,6 +233,7 @@ impl Pipeline {
failure: failure,
script_port: script_port,
opts: (*opts::get()).clone(),
+ prefs: prefs::get_cloned(),
layout_to_paint_chan: layout_to_paint_chan,
pipeline_port: pipeline_port,
layout_shutdown_chan: layout_shutdown_chan,
@@ -408,6 +410,7 @@ pub struct UnprivilegedPipelineContent {
script_port: Option<IpcReceiver<ConstellationControlMsg>>,
layout_to_paint_chan: OptionalIpcSender<LayoutToPaintMsg>,
opts: Opts,
+ prefs: HashMap<String, Pref>,
paint_shutdown_chan: IpcSender<()>,
pipeline_port: Option<IpcReceiver<LayoutControlMsg>>,
pipeline_namespace_id: PipelineNamespaceId,
@@ -472,6 +475,10 @@ impl UnprivilegedPipelineContent {
pub fn opts(&self) -> Opts {
self.opts.clone()
}
+
+ pub fn prefs(&self) -> HashMap<String, Pref> {
+ self.prefs.clone()
+ }
}
pub struct PrivilegedPipelineContent {