refactor: add CanGc as argument to create_buffer_source (#35597)

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
Yerkebulan Tulibergenov 2025-02-21 21:42:55 -08:00 committed by GitHub
parent 35f21e426b
commit 245a39c07e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 169 additions and 96 deletions

View file

@ -95,13 +95,13 @@ impl XRViewMethods<crate::DomTypeHolder> for XRView {
}
/// <https://immersive-web.github.io/webxr/#dom-xrview-projectionmatrix>
fn ProjectionMatrix(&self, _cx: JSContext) -> Float32Array {
fn ProjectionMatrix(&self, _cx: JSContext, can_gc: CanGc) -> Float32Array {
if !self.proj.is_initialized() {
let cx = GlobalScope::get_cx();
// row_major since euclid uses row vectors
let proj = self.view.projection.to_array();
self.proj
.set_data(cx, &proj)
.set_data(cx, &proj, can_gc)
.expect("Failed to set projection matrix.")
}
self.proj