aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/url.rs
diff options
context:
space:
mode:
authorkomuhangi <51232461+jahielkomu@users.noreply.github.com>2024-10-16 18:14:28 +0300
committerGitHub <noreply@github.com>2024-10-16 15:14:28 +0000
commitb0a33d6b0212be325f3c5551869be80904c24892 (patch)
tree52e979717ef6d893b5dccaca2463df89be29079d /components/script/dom/url.rs
parent2b9527262c5700473af6fb2b193f84596bedc0de (diff)
downloadservo-b0a33d6b0212be325f3c5551869be80904c24892.tar.gz
servo-b0a33d6b0212be325f3c5551869be80904c24892.zip
Some CanGc Fixes (#33865)
Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
Diffstat (limited to 'components/script/dom/url.rs')
-rw-r--r--components/script/dom/url.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/url.rs b/components/script/dom/url.rs
index 609f966177c..979de98143a 100644
--- a/components/script/dom/url.rs
+++ b/components/script/dom/url.rs
@@ -162,6 +162,7 @@ impl URLMethods for URL {
global: &GlobalScope,
url: USVString,
base: Option<USVString>,
+ can_gc: CanGc,
) -> Option<DomRoot<URL>> {
// Step 1: Let parsedURL be the result of running the API URL parser on url with base,
// if given.
@@ -176,7 +177,7 @@ impl URLMethods for URL {
// These steps are all handled while mapping the Result to an Option<ServoUrl>.
// Regarding initialization, the same condition should apply here as stated in the comments
// in Self::Constructor above - construct it on-demand inside `URL::SearchParams`.
- Some(URL::new(global, None, parsed_url.ok()?, CanGc::note()))
+ Some(URL::new(global, None, parsed_url.ok()?, can_gc))
}
/// <https://w3c.github.io/FileAPI/#dfn-createObjectURL>