mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
CanGc fixes in components/script/dom (#33862)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
5148b444be
commit
2b9527262c
10 changed files with 43 additions and 19 deletions
|
@ -361,7 +361,7 @@ impl ServoParser {
|
|||
input.push_back(String::from(chunk).into());
|
||||
}
|
||||
|
||||
self.tokenize(|tokenizer| tokenizer.feed(&input, can_gc));
|
||||
self.tokenize(|tokenizer| tokenizer.feed(&input, can_gc), can_gc);
|
||||
|
||||
if self.suspended.get() {
|
||||
// Parser got suspended, insert remaining input at end of
|
||||
|
@ -546,7 +546,10 @@ impl ServoParser {
|
|||
}
|
||||
}
|
||||
}
|
||||
self.tokenize(|tokenizer| tokenizer.feed(&self.network_input, can_gc));
|
||||
self.tokenize(
|
||||
|tokenizer| tokenizer.feed(&self.network_input, can_gc),
|
||||
can_gc,
|
||||
);
|
||||
|
||||
if self.suspended.get() {
|
||||
return;
|
||||
|
@ -576,7 +579,7 @@ impl ServoParser {
|
|||
}
|
||||
}
|
||||
|
||||
fn tokenize<F>(&self, feed: F)
|
||||
fn tokenize<F>(&self, feed: F, can_gc: CanGc)
|
||||
where
|
||||
F: Fn(&Tokenizer) -> TokenizerResult<DomRoot<HTMLScriptElement>>,
|
||||
{
|
||||
|
@ -600,7 +603,7 @@ impl ServoParser {
|
|||
self.document
|
||||
.window()
|
||||
.upcast::<GlobalScope>()
|
||||
.perform_a_microtask_checkpoint(CanGc::note());
|
||||
.perform_a_microtask_checkpoint(can_gc);
|
||||
}
|
||||
|
||||
let script_nesting_level = self.script_nesting_level.get();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue