mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-28 18:21:22 +00:00
If node is shutdown without first explicitly destroying the GPUDevice, the device's destructor will be called, which would automatically destroy the dawn device. Before doing this, it would first reject the lost-device promise. With newer versions of node, attempting to construct new GC'd objects on NodeJS tear-down triggers a fatal error. Work around this by adding a new state to promises, that allows promises to be destroyed without first being rejected or resolved, and without raising a 'Promise not resolved or rejected' fatal message. Change-Id: I810d6894d384511cdb7989b9c6c5b707dd68d8c2 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116864 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>