Remove call to env::current_dir from Browser

Put it in util::opts instead.
This commit is contained in:
Brian Anderson 2015-05-09 00:48:25 -07:00
parent dd04cf46d1
commit aa906a54d3
8 changed files with 18 additions and 21 deletions

2
ports/cef/Cargo.lock generated
View file

@ -1068,7 +1068,6 @@ dependencies = [
"profile_traits 0.0.1",
"script 0.0.1",
"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)",
"util 0.0.1",
"webdriver_server 0.0.1",
]
@ -1224,6 +1223,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]]

View file

@ -15,7 +15,6 @@ use window;
use compositing::windowing::{WindowNavigateMsg, WindowEvent};
use glutin_app;
use libc::c_int;
use util::opts;
use std::borrow::ToOwned;
use std::cell::{Cell, RefCell, BorrowState};
use std::sync::atomic::{AtomicIsize, Ordering};
@ -204,9 +203,6 @@ fn browser_host_create(window_info: &cef_window_info_t,
client: CefClient,
callback_executed: bool)
-> CefBrowser {
let url = "http://s27.postimg.org/vqbtrolyr/servo.jpg".to_owned();
let mut opts = opts::default_opts();
opts.url = url;
let browser = ServoCefBrowser::new(window_info, client).as_cef_interface();
browser.init(window_info);
if callback_executed {

View file

@ -12,6 +12,7 @@ use std::borrow::ToOwned;
use std::ffi;
use std::str;
use browser;
use std_url::Url;
const MAX_RENDERING_THREADS: usize = 128;
@ -70,7 +71,7 @@ pub extern "C" fn cef_initialize(args: *const cef_main_args_t,
};
let mut temp_opts = opts::default_opts();
temp_opts.url = HOME_URL.to_owned();
temp_opts.url = Url::parse(HOME_URL).unwrap();
temp_opts.paint_threads = rendering_threads;
temp_opts.layout_threads = rendering_threads;
temp_opts.headless = false;