Index: src/heap/objects-visiting.h |
diff --git a/src/heap/objects-visiting.h b/src/heap/objects-visiting.h |
index f8c58dd8169f657bd0a223fbc6b4cab2caf2e1ef..a442867569606c1d4471a3ee2720a1fc89cf5b13 100644 |
--- a/src/heap/objects-visiting.h |
+++ b/src/heap/objects-visiting.h |
@@ -130,10 +130,11 @@ class StaticVisitorBase : public AllStatic { |
if (has_unboxed_fields) return generic; |
- const VisitorId specialization = static_cast<VisitorId>( |
- base + (object_size >> kPointerSizeLog2) - kMinObjectSizeInWords); |
+ int visitor_id = |
+ Min(base + (object_size >> kPointerSizeLog2) - kMinObjectSizeInWords, |
+ static_cast<int>(generic)); |
- return Min(specialization, generic); |
+ return static_cast<VisitorId>(visitor_id); |
} |
}; |