Update to zero-copy* HTML parsing

html5ever now uses the Tendril string type to minimize copying internally,
but Servo still converts from/to `String` at the boundary
(which involves copying).
This commit is contained in:
Simon Sapin 2015-06-25 20:40:38 -07:00
parent ea06bebca9
commit 34bfa16517
7 changed files with 81 additions and 16 deletions

View file

@ -312,7 +312,7 @@ impl<'a> PrivateServoHTMLParserHelpers for &'a ServoHTMLParser {
let mut pending_input = self.pending_input.borrow_mut();
if !pending_input.is_empty() {
let chunk = pending_input.remove(0);
self.tokenizer.borrow_mut().feed(chunk);
self.tokenizer.borrow_mut().feed(chunk.into());
} else {
self.tokenizer.borrow_mut().run();
}