diff --git a/ext/webgpu/01_webgpu.js b/ext/webgpu/01_webgpu.js index cd1a6e5ad7..3531dd7972 100644 --- a/ext/webgpu/01_webgpu.js +++ b/ext/webgpu/01_webgpu.js @@ -174,6 +174,7 @@ super(message); } } + const GPUValidationErrorPrototype = GPUValidationError.prototype; class GPU { [webidl.brand] = webidl.brand; @@ -715,7 +716,7 @@ const validationFilteredPromise = PromisePrototypeCatch( operation, (err) => { - if (ObjectPrototypeIsPrototypeOf.prototype(GPUValidationError, err)) { + if (ObjectPrototypeIsPrototypeOf(GPUValidationErrorPrototype, err)) { return PromiseReject(err); } return PromiseResolve();