aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r--components/servo/lib.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index 22279a4189b..899ccec9986 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -122,7 +122,7 @@ pub struct Browser<Window: WindowMethods + 'static> {
}
impl<Window> Browser<Window> where Window: WindowMethods + 'static {
- pub fn new(window: Rc<Window>) -> Browser<Window> {
+ pub fn new(window: Rc<Window>, target_url: ServoUrl) -> Browser<Window> {
// Global configuration options, parsed from the command line.
let opts = opts::get();
@@ -203,7 +203,7 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
// as the navigation context.
let (constellation_chan, sw_senders) = create_constellation(opts.user_agent.clone(),
opts.config_dir.clone(),
- opts.url.clone(),
+ target_url,
compositor_proxy.clone_compositor_proxy(),
time_profiler_chan.clone(),
mem_profiler_chan.clone(),
@@ -287,7 +287,7 @@ fn create_compositor_channel(event_loop_waker: Box<compositor_thread::EventLoopW
fn create_constellation(user_agent: Cow<'static, str>,
config_dir: Option<PathBuf>,
- url: Option<ServoUrl>,
+ url: ServoUrl,
compositor_proxy: CompositorProxy,
time_profiler_chan: time::ProfilerChan,
mem_profiler_chan: mem::ProfilerChan,
@@ -337,9 +337,7 @@ fn create_constellation(user_agent: Cow<'static, str>,
constellation_chan.send(ConstellationMsg::SetWebVRThread(webvr_thread)).unwrap();
}
- if let Some(url) = url {
- constellation_chan.send(ConstellationMsg::InitLoadUrl(url)).unwrap();
- };
+ constellation_chan.send(ConstellationMsg::InitLoadUrl(url)).unwrap();
// channels to communicate with Service Worker Manager
let sw_senders = SWManagerSenders {