diff options
author | chickenleaf <lashwinib@gmail.com> | 2024-10-18 19:12:43 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-18 13:42:43 +0000 |
commit | af6154cf630bd498f8b5afbd8a321eb4a45463b6 (patch) | |
tree | 364dcf5c2d2cfd247716eed34bc04d0aa136c263 /components/script/dom/webgl2renderingcontext.rs | |
parent | fde8d72acabb6f8314efe0e66312c02a488a7613 (diff) | |
download | servo-af6154cf630bd498f8b5afbd8a321eb4a45463b6.tar.gz servo-af6154cf630bd498f8b5afbd8a321eb4a45463b6.zip |
More files with CanGc fixes (#33892)
* More files with CanGc fixes
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* removed the can_gc inside !task
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
---------
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
Diffstat (limited to 'components/script/dom/webgl2renderingcontext.rs')
-rw-r--r-- | components/script/dom/webgl2renderingcontext.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs index b2e7874567f..2fdc56611d7 100644 --- a/components/script/dom/webgl2renderingcontext.rs +++ b/components/script/dom/webgl2renderingcontext.rs @@ -69,7 +69,7 @@ use crate::dom::webgluniformlocation::WebGLUniformLocation; use crate::dom::webglvertexarrayobject::WebGLVertexArrayObject; use crate::dom::window::Window; use crate::js::conversions::ToJSValConvertible; -use crate::script_runtime::JSContext; +use crate::script_runtime::{CanGc, JSContext}; #[crown::unrooted_must_root_lint::must_root] #[derive(JSTraceable, MallocSizeOf)] @@ -143,8 +143,10 @@ impl WebGL2RenderingContext { canvas: &HTMLCanvasElementOrOffscreenCanvas, size: Size2D<u32>, attrs: GLContextAttributes, + can_gc: CanGc, ) -> Option<WebGL2RenderingContext> { - let base = WebGLRenderingContext::new(window, canvas, WebGLVersion::WebGL2, size, attrs)?; + let base = + WebGLRenderingContext::new(window, canvas, WebGLVersion::WebGL2, size, attrs, can_gc)?; let samplers = (0..base.limits().max_combined_texture_image_units) .map(|_| Default::default()) @@ -190,8 +192,9 @@ impl WebGL2RenderingContext { canvas: &HTMLCanvasElementOrOffscreenCanvas, size: Size2D<u32>, attrs: GLContextAttributes, + can_gc: CanGc, ) -> Option<DomRoot<WebGL2RenderingContext>> { - WebGL2RenderingContext::new_inherited(window, canvas, size, attrs) + WebGL2RenderingContext::new_inherited(window, canvas, size, attrs, can_gc) .map(|ctx| reflect_dom_object(Box::new(ctx), window)) } |