mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Pass a borrowed Url to parse_html.
It does not need to take ownership, and I want to reuse final_url in the caller.
This commit is contained in:
parent
8838f2460e
commit
795327d5c4
2 changed files with 2 additions and 2 deletions
|
@ -163,7 +163,7 @@ impl<'a> TreeSink<TrustedNodeAddress> for servohtmlparser::Sink {
|
|||
|
||||
pub fn parse_html(document: JSRef<Document>,
|
||||
input: HTMLInput,
|
||||
url: Url) {
|
||||
url: &Url) {
|
||||
let parser = ServoHTMLParser::new(Some(url.clone()), document).root();
|
||||
let parser: JSRef<ServoHTMLParser> = *parser;
|
||||
|
||||
|
|
|
@ -781,7 +781,7 @@ impl ScriptTask {
|
|||
(InputString(strval.unwrap_or("".to_string())), doc_url)
|
||||
};
|
||||
|
||||
parse_html(*document, parser_input, final_url);
|
||||
parse_html(*document, parser_input, &final_url);
|
||||
url = page.get_url().clone();
|
||||
|
||||
document.set_ready_state(DocumentReadyStateValues::Interactive);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue