mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Some CanGc Fixes (#33865)
Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
This commit is contained in:
parent
2b9527262c
commit
b0a33d6b02
2 changed files with 3 additions and 1 deletions
|
@ -235,6 +235,7 @@ DOMInterfaces = {
|
||||||
|
|
||||||
'URL': {
|
'URL': {
|
||||||
'weakReferenceable': True,
|
'weakReferenceable': True,
|
||||||
|
'canGc': ['Parse'],
|
||||||
},
|
},
|
||||||
|
|
||||||
'VRDisplay': {
|
'VRDisplay': {
|
||||||
|
|
|
@ -162,6 +162,7 @@ impl URLMethods for URL {
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
url: USVString,
|
url: USVString,
|
||||||
base: Option<USVString>,
|
base: Option<USVString>,
|
||||||
|
can_gc: CanGc,
|
||||||
) -> Option<DomRoot<URL>> {
|
) -> Option<DomRoot<URL>> {
|
||||||
// Step 1: Let parsedURL be the result of running the API URL parser on url with base,
|
// Step 1: Let parsedURL be the result of running the API URL parser on url with base,
|
||||||
// if given.
|
// if given.
|
||||||
|
@ -176,7 +177,7 @@ impl URLMethods for URL {
|
||||||
// These steps are all handled while mapping the Result to an Option<ServoUrl>.
|
// 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
|
// Regarding initialization, the same condition should apply here as stated in the comments
|
||||||
// in Self::Constructor above - construct it on-demand inside `URL::SearchParams`.
|
// 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>
|
/// <https://w3c.github.io/FileAPI/#dfn-createObjectURL>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue