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
|
@ -149,10 +149,10 @@ impl XRRenderStateMethods<crate::DomTypeHolder> for XRRenderState {
|
|||
}
|
||||
|
||||
/// <https://immersive-web.github.io/layers/#dom-xrrenderstate-layers>
|
||||
fn Layers(&self, cx: JSContext, retval: MutableHandleValue) {
|
||||
fn Layers(&self, cx: JSContext, can_gc: CanGc, retval: MutableHandleValue) {
|
||||
// TODO: cache this array?
|
||||
let layers = self.layers.borrow();
|
||||
let layers: Vec<&XRLayer> = layers.iter().map(|x| &**x).collect();
|
||||
to_frozen_array(&layers[..], cx, retval)
|
||||
to_frozen_array(&layers[..], cx, retval, can_gc)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue