Commit e9d1e6b1 authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

cppgc: Fix compilation error on gcc

Without the cast, gcc might throw the following error
during compilation:

error: enumeral mismatch in conditional expression:
'cppgc::internal::StatsCollector::ScopeId' vs
'cppgc::internal::StatsCollector::ConcurrentScopeId'

Change-Id: I95e230310a0cbdc775d63657b8c407a8392a57e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551104Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71325}
parent f121194c
......@@ -147,9 +147,10 @@ class V8_EXPORT_PRIVATE StatsCollector final {
start_time_(v8::base::TimeTicks::Now()),
scope_id_(scope_id) {
DCHECK_LE(0, scope_id_);
DCHECK_LT(scope_id_, scope_category == kMutatorThread
? kNumScopeIds
: kNumConcurrentScopeIds);
DCHECK_LT(static_cast<int>(scope_id_),
scope_category == kMutatorThread
? static_cast<int>(kNumScopeIds)
: static_cast<int>(kNumConcurrentScopeIds));
StartTrace(args...);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment