aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/codegen/Bindings.conf1
-rw-r--r--components/script/dom/url.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/Bindings.conf b/components/script/dom/bindings/codegen/Bindings.conf
index eaad281c1f6..e2cd66af44f 100644
--- a/components/script/dom/bindings/codegen/Bindings.conf
+++ b/components/script/dom/bindings/codegen/Bindings.conf
@@ -235,6 +235,7 @@ DOMInterfaces = {
'URL': {
'weakReferenceable': True,
+ 'canGc': ['Parse'],
},
'VRDisplay': {
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>