mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Fix panic in parser-reentrancy-customelement.window.js (#33162)
* Try to fix panic in parser-reentrancy-customelement.window.js Signed-off-by: Taym <haddadi.taym@gmail.com> * ./mach fmt Signed-off-by: Taym <haddadi.taym@gmail.com> * Only return with ToTokenizerMsg::End and continue for others Signed-off-by: Taym <haddadi.taym@gmail.com> --------- Signed-off-by: Taym <haddadi.taym@gmail.com>
This commit is contained in:
parent
9639d36550
commit
bb5547a5d0
2 changed files with 6 additions and 8 deletions
|
@ -318,7 +318,7 @@ impl Tokenizer {
|
|||
let script = self.get_node(&script.id);
|
||||
return TokenizerResult::Script(DomRoot::from_ref(script.downcast().unwrap()));
|
||||
},
|
||||
ToTokenizerMsg::End => unreachable!(),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -334,8 +334,12 @@ impl Tokenizer {
|
|||
.expect("Unexpected channel panic in main thread.")
|
||||
{
|
||||
ToTokenizerMsg::ProcessOperation(parse_op) => self.process_operation(parse_op),
|
||||
ToTokenizerMsg::TokenizerResultDone { updated_input: _ } |
|
||||
ToTokenizerMsg::TokenizerResultScript {
|
||||
script: _,
|
||||
updated_input: _,
|
||||
} => continue,
|
||||
ToTokenizerMsg::End => return,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[parser-reentrancy-customelement.window.html?default]
|
||||
prefs: ["dom.servoparser.async_html_tokenizer.enabled:false"]
|
||||
|
||||
[parser-reentrancy-customelement.window.html?async]
|
||||
expected: CRASH
|
||||
prefs: ["dom.servoparser.async_html_tokenizer.enabled:true"]
|
Loading…
Add table
Add a link
Reference in a new issue