mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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>
This commit is contained in:
parent
0917e080df
commit
cb56ac8561
21 changed files with 97 additions and 43 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue