mirror of
https://github.com/electron/electron.git
synced 2026-10-28 11:44:46 +08:00
fix: avoid NoDestructor on trivially destructible QueueState in release builds (#54554)
With DCHECKs off, SEQUENCE_CHECKER expands to nothing, leaving QueueState trivially destructible and tripping base::NoDestructor's static_assert. Give it a user-provided destructor so it is non-trivial in every config. Claude-Session: https://claude.ai/code/session_01FsSQW86CrHuBNQNRMyPCex Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
2454be571a
commit
e128184820
1 file changed
+3
@@ -22,6 +22,9 @@ namespace electron {
|
||||
namespace {
|
||||
|
||||
struct QueueState {
|
||||
// Non-trivial so NoDestructor accepts it when DCHECKs are off.
|
||||
~QueueState() {} // NOLINT(modernize-use-equals-default)
|
||||
|
||||
SEQUENCE_CHECKER(sequence_checker);
|
||||
bool release_scheduled = false;
|
||||
bool shutdown_started = false;
|
||||
|
||||
Reference in new issue
Block a user