diff options
author | Corey Farwell <coreyf@rwell.org> | 2016-12-09 11:00:24 -1000 |
---|---|---|
committer | Corey Farwell <coreyf@rwell.org> | 2016-12-09 11:00:24 -1000 |
commit | 8dfbfc2c48f5c896e538534368af964f08ecb67a (patch) | |
tree | 05653e888f5265bffd3ba8c3a2ee79e9ca8c9617 /components/constellation/pipeline.rs | |
parent | 120b003195383041b9f182fc03103e50f9249e49 (diff) | |
download | servo-8dfbfc2c48f5c896e538534368af964f08ecb67a.tar.gz servo-8dfbfc2c48f5c896e538534368af964f08ecb67a.zip |
Remove `Constellation::child_processes`.
Fixes https://github.com/servo/servo/issues/11459.
Diffstat (limited to 'components/constellation/pipeline.rs')
-rw-r--r-- | components/constellation/pipeline.rs | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/components/constellation/pipeline.rs b/components/constellation/pipeline.rs index 890476e5010..81c7fead955 100644 --- a/components/constellation/pipeline.rs +++ b/components/constellation/pipeline.rs @@ -134,15 +134,14 @@ pub struct InitialPipelineState { impl Pipeline { /// Starts a paint thread, layout thread, and possibly a script thread, in /// a new process if requested. - pub fn spawn<Message, LTF, STF>(state: InitialPipelineState) - -> Result<(Pipeline, Option<ChildProcess>), IOError> + pub fn spawn<Message, LTF, STF>(state: InitialPipelineState) -> Result<Pipeline, IOError> where LTF: LayoutThreadFactory<Message=Message>, STF: ScriptThreadFactory<Message=Message> { // Note: we allow channel creation to panic, since recovering from this // probably requires a general low-memory strategy. let (pipeline_chan, pipeline_port) = ipc::channel() - .expect("Pipeline main chan");; + .expect("Pipeline main chan"); let (layout_content_process_shutdown_chan, layout_content_process_shutdown_port) = ipc::channel().expect("Pipeline layout content shutdown chan"); @@ -180,7 +179,6 @@ impl Pipeline { } }; - let mut child_process = None; if let Some((script_port, pipeline_port)) = content_ports { // Route messages coming from content to devtools as appropriate. let script_to_devtools_chan = state.devtools_chan.as_ref().map(|devtools_chan| { @@ -236,24 +234,22 @@ impl Pipeline { // // Yes, that's all there is to it! if opts::multiprocess() { - child_process = Some(try!(unprivileged_pipeline_content.spawn_multiprocess())); + let _ = try!(unprivileged_pipeline_content.spawn_multiprocess()); } else { unprivileged_pipeline_content.start_all::<Message, LTF, STF>(false); } } - let pipeline = Pipeline::new(state.id, - state.frame_id, - state.parent_info, - script_chan, - pipeline_chan, - state.compositor_proxy, - state.is_private, - state.load_data.url, - state.window_size, - state.prev_visibility.unwrap_or(true)); - - Ok((pipeline, child_process)) + Ok(Pipeline::new(state.id, + state.frame_id, + state.parent_info, + script_chan, + pipeline_chan, + state.compositor_proxy, + state.is_private, + state.load_data.url, + state.window_size, + state.prev_visibility.unwrap_or(true))) } /// Creates a new `Pipeline`, after the script and layout threads have been |