[dawn][emscripten] Fix missing constructor initializations for events.
- Adds crucial initializers in some of the events that were missed
in the initial implementation.
Bug: 369445681, 372080121
Change-Id: Id5d8502d59e2441266a7866ed39f29f494e18747
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/211939
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/third_party/emdawnwebgpu/webgpu.cpp b/third_party/emdawnwebgpu/webgpu.cpp
index e30dc54..f6ce6d1 100644
--- a/third_party/emdawnwebgpu/webgpu.cpp
+++ b/third_party/emdawnwebgpu/webgpu.cpp
@@ -747,7 +747,11 @@
CompilationInfoEvent(InstanceID instance,
WGPUShaderModule shader,
const WGPUCompilationInfoCallbackInfo2& callbackInfo)
- : TrackedEvent(instance, callbackInfo.mode), mShader(shader) {}
+ : TrackedEvent(instance, callbackInfo.mode),
+ mCallback(callbackInfo.callback),
+ mUserdata1(callbackInfo.userdata1),
+ mUserdata2(callbackInfo.userdata2),
+ mShader(shader) {}
EventType GetType() override { return kType; }
@@ -946,7 +950,11 @@
MapAsyncEvent(InstanceID instance,
WGPUBuffer buffer,
const WGPUBufferMapCallbackInfo2& callbackInfo)
- : TrackedEvent(instance, callbackInfo.mode), mBuffer(buffer) {}
+ : TrackedEvent(instance, callbackInfo.mode),
+ mCallback(callbackInfo.callback),
+ mUserdata1(callbackInfo.userdata1),
+ mUserdata2(callbackInfo.userdata2),
+ mBuffer(buffer) {}
EventType GetType() override { return kType; }