aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpushadermodule.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/gpushadermodule.rs')
-rw-r--r--components/script/dom/gpushadermodule.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/components/script/dom/gpushadermodule.rs b/components/script/dom/gpushadermodule.rs
index 3c752e7fe4a..c4f20124ea8 100644
--- a/components/script/dom/gpushadermodule.rs
+++ b/components/script/dom/gpushadermodule.rs
@@ -19,17 +19,21 @@ pub struct GPUShaderModule {
}
impl GPUShaderModule {
- fn new_inherited(shader_module: WebGPUShaderModule) -> Self {
+ fn new_inherited(shader_module: WebGPUShaderModule, label: Option<USVString>) -> Self {
Self {
reflector_: Reflector::new(),
- label: DomRefCell::new(None),
+ label: DomRefCell::new(label),
shader_module,
}
}
- pub fn new(global: &GlobalScope, shader_module: WebGPUShaderModule) -> DomRoot<Self> {
+ pub fn new(
+ global: &GlobalScope,
+ shader_module: WebGPUShaderModule,
+ label: Option<USVString>,
+ ) -> DomRoot<Self> {
reflect_dom_object(
- Box::new(GPUShaderModule::new_inherited(shader_module)),
+ Box::new(GPUShaderModule::new_inherited(shader_module, label)),
global,
)
}