Change parse_progress() take JSRef by value. [Issue#5738]

This commit is contained in:
Dhananjay Nakrani 2015-04-18 12:42:51 -07:00
parent f164cc253e
commit 7cdfc76ea9

View file

@ -275,7 +275,7 @@ pub fn parse_html(document: JSRef<Document>,
task_state::enter(IN_HTML_PARSER);
}
fn parse_progress(parser: &JSRef<ServoHTMLParser>, url: &Url, load_response: &LoadResponse) {
fn parse_progress(parser: JSRef<ServoHTMLParser>, url: &Url, load_response: &LoadResponse) {
for msg in load_response.progress_port.iter() {
match msg {
ProgressMsg::Payload(data) => {
@ -314,10 +314,10 @@ pub fn parse_html(document: JSRef<Document>,
// https://html.spec.whatwg.org/multipage/#read-text
let page = format!("<pre>\u{000A}<plaintext>");
parser.parse_chunk(page);
parse_progress(&parser, url, &load_response);
parse_progress(parser, url, &load_response);
},
_ => {
parse_progress(&parser, url, &load_response);
parse_progress(parser, url, &load_response);
}
}
}