diff options
author | Josh Matthews <josh@joshmatthews.net> | 2015-02-04 17:56:31 +0000 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2015-02-04 17:56:31 +0000 |
commit | a814ba4449ef2c0f152807e763ef610381fee1de (patch) | |
tree | 14b7d229ee880d578dcf3f194c719d03182eb6ac | |
parent | 03ec5a394c6621b4fcb39b72c17e669320a2708b (diff) | |
download | servo-a814ba4449ef2c0f152807e763ef610381fee1de.tar.gz servo-a814ba4449ef2c0f152807e763ef610381fee1de.zip |
Use an option for the parser input.
-rw-r--r-- | components/script/script_task.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 71f34c9330f..2d64f53b396 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -810,12 +810,12 @@ impl ScriptTask { let final_url = load_response.metadata.final_url.clone(); - (HTMLInput::InputUrl(load_response), final_url, last_modified) + (Some(HTMLInput::InputUrl(load_response)), final_url, last_modified) } else { let doc_url = last_url.unwrap_or_else(|| { Url::parse("about:blank").unwrap() }); - (HTMLInput::InputString("".to_owned()), doc_url, None) + (None, doc_url, None) }; // Store the final URL before we start parsing, so that DOM routines @@ -858,10 +858,10 @@ impl ScriptTask { let jsval = window.r().evaluate_js_on_global_with_result(evalstr); let strval = FromJSValConvertible::from_jsval(self.get_cx(), jsval, StringificationBehavior::Empty); - parser_input = HTMLInput::InputString(strval.unwrap_or("".to_owned())); + parser_input = Some(HTMLInput::InputString(strval.unwrap_or("".to_owned()))); }; - parse_html(document.r(), parser_input, &final_url); + parse_html(document.r(), parser_input.unwrap(), &final_url); document.r().set_ready_state(DocumentReadyState::Interactive); self.compositor.borrow_mut().set_ready_state(pipeline_id, PerformingLayout); |