script: add CanGc as argument to VirtualMethods.post_connection_steps (#40329)

script: add `CanGc` as argument to
`VirtualMethods.post_connection_steps`

Testing: These changes do not require tests because they are a refactor.
Addresses part of https://github.com/servo/servo/issues/34573

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
Yerkebulan Tulibergenov
2025-11-01 03:01:15 -07:00
committed by GitHub
parent 5571c09523
commit 1713f0c8f2
5 changed files with 14 additions and 14 deletions

View File

@@ -1311,13 +1311,13 @@ impl VirtualMethods for HTMLScriptElement {
}
/// <https://html.spec.whatwg.org/multipage/#script-processing-model:the-script-element-20>
fn post_connection_steps(&self) {
fn post_connection_steps(&self, can_gc: CanGc) {
if let Some(s) = self.super_type() {
s.post_connection_steps();
s.post_connection_steps(can_gc);
}
if self.upcast::<Node>().is_connected() && !self.parser_inserted.get() {
self.prepare(Some(IntroductionType::INJECTED_SCRIPT), CanGc::note());
self.prepare(Some(IntroductionType::INJECTED_SCRIPT), can_gc);
}
}