Skip to content

Commit

Permalink
Use FlagValue::value() in SLOW_DCHECK
Browse files Browse the repository at this point in the history
Previously SLOW_DCHECK used the non-constexpr bool() operator
of FlagValue, which cannot be used in constexpr. Switch to
FlagValue::value() instead for make it compile in constexpr.

Change-Id: I3e4f70d82c0027cf56999b6c4639479606151696
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4341495
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#86611}
  • Loading branch information
joyeecheung authored and V8 LUCI CQ committed Mar 21, 2023
1 parent 9041901 commit 215ccd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/checks.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#ifdef ENABLE_SLOW_DCHECKS
#define SLOW_DCHECK(condition) \
CHECK(!v8::internal::v8_flags.enable_slow_asserts || (condition))
CHECK(!v8::internal::v8_flags.enable_slow_asserts.value() || (condition))
#define SLOW_DCHECK_IMPLIES(lhs, rhs) SLOW_DCHECK(!(lhs) || (rhs))
#else
#define SLOW_DCHECK(condition) ((void)0)
Expand Down

0 comments on commit 215ccd5

Please sign in to comment.