Skip to content

Commit 599cefa

Browse files
michaelgiraldoDawn LUCI CQ
authored andcommitted
emdawnwebgpu: add Symbol.iterator to externs
GPUSupportedFeatures and WGSLLanguageFeatures implement Iterable but are missing Symbol.iterator in the Closure externs, which triggers warnings. Bug: chromium:472022911 Test: emcc /tmp/webgpu_closure.c --closure 1 --closure-args="--externs=/tmp/dawn-externs.js --warning_level=VERBOSE --jscomp_warning=checkTypes" -O2 -o /tmp/webgpu_closure.js Change-Id: Ie78a5d102ed0c132b10dc630bcc2a843de8e4acd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/282535 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com>
1 parent 7494e9f commit 599cefa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

third_party/emdawnwebgpu/pkg/webgpu/src/webgpu-externs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ GPUSupportedFeatures.prototype.values = function(...args) {};
159159
GPUSupportedFeatures.prototype.forEach = function(...args) {};
160160
/** @return {boolean} */
161161
GPUSupportedFeatures.prototype.has = function(...args) {};
162+
/** @return {!Iterator<string>} */
163+
GPUSupportedFeatures.prototype[Symbol.iterator] = function() {};
162164

163165
/**
164166
* @constructor
@@ -177,6 +179,8 @@ WGSLLanguageFeatures.prototype.values = function(...args) {};
177179
WGSLLanguageFeatures.prototype.forEach = function(...args) {};
178180
/** @return {boolean} */
179181
WGSLLanguageFeatures.prototype.has = function(...args) {};
182+
/** @return {!Iterator<string>} */
183+
WGSLLanguageFeatures.prototype[Symbol.iterator] = function() {};
180184

181185
/** @constructor */
182186
function GPUAdapterInfo() {}

0 commit comments

Comments
 (0)