aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webgpu/gpubuffer.rs
diff options
context:
space:
mode:
authorYerkebulan Tulibergenov <yerkebulan@gmail.com>2025-02-22 16:35:44 -0800
committerGitHub <noreply@github.com>2025-02-23 00:35:44 +0000
commitdd13342f184bee27ed1591a122727adca1247004 (patch)
treeee397f4dd4196a343cf73c35adbcd5d36dc43aa8 /components/script/dom/webgpu/gpubuffer.rs
parentb0b0289014b707505a6921152b9ecba75afa207f (diff)
downloadservo-dd13342f184bee27ed1591a122727adca1247004.tar.gz
servo-dd13342f184bee27ed1591a122727adca1247004.zip
refactor: add CanGc as argument to DataBlock::view (#35610)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
Diffstat (limited to 'components/script/dom/webgpu/gpubuffer.rs')
-rw-r--r--components/script/dom/webgpu/gpubuffer.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/webgpu/gpubuffer.rs b/components/script/dom/webgpu/gpubuffer.rs
index 5ef93157e28..74ee6249a36 100644
--- a/components/script/dom/webgpu/gpubuffer.rs
+++ b/components/script/dom/webgpu/gpubuffer.rs
@@ -297,6 +297,7 @@ impl GPUBufferMethods<crate::DomTypeHolder> for GPUBuffer {
_cx: JSContext,
offset: GPUSize64,
size: Option<GPUSize64>,
+ can_gc: CanGc,
) -> Fallible<ArrayBuffer> {
let range_size = if let Some(s) = size {
s
@@ -321,7 +322,7 @@ impl GPUBufferMethods<crate::DomTypeHolder> for GPUBuffer {
let rebased_offset = (offset - mapping.range.start) as usize;
mapping
.data
- .view(rebased_offset..rebased_offset + range_size as usize)
+ .view(rebased_offset..rebased_offset + range_size as usize, can_gc)
.map(|view| view.array_buffer())
.map_err(|()| Error::Operation)
}