From bc284691d2cc06a4316cd5361193be3d24d911e6 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sat, 9 May 2015 22:04:12 -0700 Subject: [PATCH] Fix gonk port --- ports/gonk/Cargo.lock | 1 + ports/gonk/src/lib.rs | 11 +---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 6078ce1206b..b09bc8d552a 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -1086,6 +1086,7 @@ dependencies = [ "string_cache 0.1.0 (git+https://github.com/servo/string-cache)", "string_cache_plugin 0.1.1 (git+https://github.com/servo/string-cache)", "time 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "url 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] diff --git a/ports/gonk/src/lib.rs b/ports/gonk/src/lib.rs index 0038ee8eeb6..bc9a8f6bb86 100644 --- a/ports/gonk/src/lib.rs +++ b/ports/gonk/src/lib.rs @@ -122,17 +122,8 @@ impl Browser { devtools_chan, storage_task); - // Send the URL command to the constellation. - let cwd = env::current_dir().unwrap(); - let url = match url::Url::parse(&opts.url) { - Ok(url) => url, - Err(url::ParseError::RelativeUrlWithoutBase) - => url::Url::from_file_path(&*cwd.join(&opts.url)).unwrap(), - Err(_) => panic!("URL parsing failed"), - }; - let ConstellationChan(ref chan) = constellation_chan; - chan.send(ConstellationMsg::InitLoadUrl(url)).unwrap(); + chan.send(ConstellationMsg::InitLoadUrl(opts.url.clone())).unwrap(); // The compositor coordinates with the client window to create the final // rendered page and display it somewhere.