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: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/master@{#68201}
This commit is contained in:
parent
2954b407d6
commit
a582b84a28
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user