Commit bf003aaf authored by Michael Lippautz's avatar Michael Lippautz Committed by V8 LUCI CQ

cppgc: Smaller fixes

Bug: chromium:1056170
Change-Id: Ifa1f8d4c1b1003e9d33f1c9b42e6647388c56d01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2878746Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74438}
parent 9c40b865
......@@ -57,7 +57,7 @@ struct HeapStatistics final {
};
/**
* Stastistics of the freelist (used only in non-large object spaces). For
* Statistics of the freelist (used only in non-large object spaces). For
* each bucket in the freelist the statistics record the bucket size, the
* number of freelist entries in the bucket, and the overall allocated memory
* consumed by these freelist entries.
......@@ -67,7 +67,7 @@ struct HeapStatistics final {
std::vector<size_t> bucket_size;
/** number of freelist entries per bucket. */
std::vector<size_t> free_count;
/** memory size concumed by freelist entries per size. */
/** memory size consumed by freelist entries per size. */
std::vector<size_t> free_size;
};
......
......@@ -14,7 +14,7 @@ class StatsCollector;
/**
* Base class used for reporting GC statistics histograms. Embedders interested
* in collecting histgorams should implement the virtual AddMainThreadEvent
* in collecting histograms should implement the virtual AddMainThreadEvent
* methods below and pass an instance of the implementation during Heap
* creation.
*/
......
......@@ -15,7 +15,7 @@ class ProcessHeapStatisticsUpdater {
public:
// Allocation observer implementation for heaps should register to contribute
// to ProcessHeapStatistics. The heap is responsible for allocating and
// registering the obsrever impl with its stats collector.
// registering the observer impl with its stats collector.
class AllocationObserverImpl final
: public StatsCollector::AllocationObserver {
public:
......
......@@ -256,7 +256,7 @@ class V8_EXPORT_PRIVATE StatsCollector final {
void NotifyAllocation(size_t);
void NotifyExplicitFree(size_t);
// Safepoints should only be invoked when garabge collections are possible.
// Safepoints should only be invoked when garbage collections are possible.
// This is necessary as increments and decrements are reported as close to
// their actual allocation/reclamation as possible.
void NotifySafePointForConservativeCollection();
......
......@@ -340,13 +340,13 @@ void NullStateAssignment(cppgc::Heap* heap) {
PersistentType<GCed> p =
MakeGarbageCollected<GCed>(heap->GetAllocationHandle());
EXPECT_EQ(1u, GetRegion<PersistentType>(heap).NodesInUse());
p = static_cast<GCed*>(0);
p = static_cast<GCed*>(nullptr);
EXPECT_EQ(nullptr, p.Get());
EXPECT_EQ(0u, GetRegion<PersistentType>(heap).NodesInUse());
}
}
TEST_F(PersistentTest, NullStateAssignemnt) {
TEST_F(PersistentTest, NullStateAssignment) {
auto* heap = GetHeap();
NullStateAssignment<Persistent>(heap);
NullStateAssignment<WeakPersistent>(heap);
......
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