mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
DataTransfer: propagate CanGc argument (#35062)
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
parent
17b70c5178
commit
1bd34a5781
5 changed files with 41 additions and 18 deletions
|
@ -34,11 +34,15 @@ impl DataTransferItem {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn new(global: &GlobalScope, item: Kind) -> DomRoot<DataTransferItem> {
|
||||
pub(crate) fn new(
|
||||
global: &GlobalScope,
|
||||
can_gc: CanGc,
|
||||
item: Kind,
|
||||
) -> DomRoot<DataTransferItem> {
|
||||
reflect_dom_object(
|
||||
Box::new(DataTransferItem::new_inherited(item)),
|
||||
global,
|
||||
CanGc::note(),
|
||||
can_gc,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +69,7 @@ impl DataTransferItemMethods<crate::DomTypeHolder> for DataTransferItem {
|
|||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-datatransferitem-getasfile>
|
||||
fn GetAsFile(&self) -> Option<DomRoot<File>> {
|
||||
self.item.as_file(&self.global())
|
||||
fn GetAsFile(&self, can_gc: CanGc) -> Option<DomRoot<File>> {
|
||||
self.item.as_file(&self.global(), can_gc)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue