Commit a582b84a authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

cppgc: Initialize MarkingVisitor's marked bytes as zero

Bug: chromium:1056170
Change-Id: I1e168f967acf0e4d6094106c0693e1a10f409f49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2231357
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68201}
parent 2954b407
......@@ -58,7 +58,7 @@ class MarkingVisitor : public VisitorBase, public StackVisitor {
Marker::NotFullyConstructedWorklist::View not_fully_constructed_worklist_;
Marker::WeakCallbackWorklist::View weak_callback_worklist_;
size_t marked_bytes_;
size_t marked_bytes_ = 0;
};
class V8_EXPORT_PRIVATE MutatorThreadMarkingVisitor : public MarkingVisitor {
......
......@@ -46,6 +46,11 @@ class GCedWithMixin : public GarbageCollected<GCedWithMixin>, public Mixin {
} // namespace
TEST_F(MarkingVisitorTest, MarkedBytesAreInitiallyZero) {
MutatorThreadMarkingVisitor visitor(GetMarker());
EXPECT_EQ(0u, visitor.marked_bytes());
}
// Strong refernces are marked.
TEST_F(MarkingVisitorTest, MarkMember) {
......
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