aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/notification.rs
diff options
context:
space:
mode:
authorArya Nair <aryaajitnair@gmail.com>2025-03-19 23:33:09 +0530
committerGitHub <noreply@github.com>2025-03-19 18:03:09 +0000
commitcb56ac8561ab4f27d0268881e7c95ee57a2eadfe (patch)
treef1d73e3b202a8d06ce988578cc0ee355a451d7be /components/script/dom/notification.rs
parent0917e080df769011f6fd4348d63f8fd5895baa21 (diff)
downloadservo-cb56ac8561ab4f27d0268881e7c95ee57a2eadfe.tar.gz
servo-cb56ac8561ab4f27d0268881e7c95ee57a2eadfe.zip
feat: add can_gc argument to to_frozen_array (#36043)
* feat: add can_gc argument to to_frozen_array Signed-off-by: Arya Nair <aryaajitnair@gmail.com> * fix: linting issues Signed-off-by: Arya Nair <aryaajitnair@gmail.com> * feat: add can_gc in binding.conf Signed-off-by: Arya Nair <aryaajitnair@gmail.com> * fix: linting issues Signed-off-by: Arya Nair <aryaajitnair@gmail.com> --------- Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
Diffstat (limited to 'components/script/dom/notification.rs')
-rw-r--r--components/script/dom/notification.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/notification.rs b/components/script/dom/notification.rs
index 7992cb459c3..197a79e9bfb 100644
--- a/components/script/dom/notification.rs
+++ b/components/script/dom/notification.rs
@@ -441,7 +441,7 @@ impl NotificationMethods<crate::DomTypeHolder> for Notification {
retval.set(self.data.get());
}
/// <https://notifications.spec.whatwg.org/#dom-notification-actions>
- fn Actions(&self, cx: SafeJSContext, retval: MutableHandleValue) {
+ fn Actions(&self, cx: SafeJSContext, can_gc: CanGc, retval: MutableHandleValue) {
// step 1: Let frozenActions be an empty list of type NotificationAction.
let mut frozen_actions: Vec<NotificationAction> = Vec::new();
@@ -461,11 +461,11 @@ impl NotificationMethods<crate::DomTypeHolder> for Notification {
}
// step 3: Return the result of create a frozen array from frozenActions.
- to_frozen_array(frozen_actions.as_slice(), cx, retval);
+ to_frozen_array(frozen_actions.as_slice(), cx, retval, can_gc);
}
/// <https://notifications.spec.whatwg.org/#dom-notification-vibrate>
- fn Vibrate(&self, cx: SafeJSContext, retval: MutableHandleValue) {
- to_frozen_array(self.vibration_pattern.as_slice(), cx, retval);
+ fn Vibrate(&self, cx: SafeJSContext, can_gc: CanGc, retval: MutableHandleValue) {
+ to_frozen_array(self.vibration_pattern.as_slice(), cx, retval, can_gc);
}
/// <https://notifications.spec.whatwg.org/#dom-notification-timestamp>
fn Timestamp(&self) -> u64 {