CanGc fixes from EventTarget::fire_event (#33985)

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
tanishka 2024-10-24 04:18:19 +05:30 committed by GitHub
parent bb4932026c
commit ea875f0a51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 155 additions and 115 deletions

View file

@ -404,14 +404,15 @@ impl ServoParser {
// Step 2.
self.document
.set_ready_state(DocumentReadyState::Interactive);
.set_ready_state(DocumentReadyState::Interactive, can_gc);
// Step 3.
self.tokenizer.end(can_gc);
self.document.set_current_parser(None);
// Step 4.
self.document.set_ready_state(DocumentReadyState::Complete);
self.document
.set_ready_state(DocumentReadyState::Complete, can_gc);
}
// https://html.spec.whatwg.org/multipage/#active-parser
@ -633,7 +634,7 @@ impl ServoParser {
// Step 1.
self.document
.set_ready_state(DocumentReadyState::Interactive);
.set_ready_state(DocumentReadyState::Interactive, can_gc);
// Step 2.
self.tokenizer.end(can_gc);
@ -1006,10 +1007,10 @@ impl FetchResponseListener for ParserContext {
CrossProcessInstant::now(),
document,
);
self.pushed_entry_index = document
.global()
.performance()
.queue_entry(performance_entry.upcast::<PerformanceEntry>());
self.pushed_entry_index = document.global().performance().queue_entry(
performance_entry.upcast::<PerformanceEntry>(),
CanGc::note(),
);
}
}