mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
queue event instead of immediately fire
created checks to see if parser is in use before event dispatch changed tests to expect crash and added async style test
This commit is contained in:
parent
462409ada5
commit
79d896d474
9 changed files with 72 additions and 3 deletions
|
@ -102,6 +102,10 @@ enum LastChunkState {
|
|||
}
|
||||
|
||||
impl ServoParser {
|
||||
pub fn parser_is_not_active(&self) -> bool {
|
||||
self.can_write() || self.tokenizer.try_borrow_mut().is_ok()
|
||||
}
|
||||
|
||||
pub fn parse_html_document(document: &Document, input: DOMString, url: ServoUrl) {
|
||||
let parser = if PREFS.get("dom.servoparser.async_html_tokenizer.enabled").as_boolean().unwrap() {
|
||||
ServoParser::new(document,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue