mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:37:46 +00:00
LibJS: Fix typo "sweeped" => "swept" everywhere
This commit is contained in:
parent
1bd52ce789
commit
cd53d046b2
10 changed files with 17 additions and 17 deletions
|
@ -42,19 +42,19 @@ bool FinalizationRegistry::remove_by_token(Object& unregister_token)
|
|||
return removed;
|
||||
}
|
||||
|
||||
void FinalizationRegistry::remove_sweeped_cells(Badge<Heap>, Vector<Cell*>& cells)
|
||||
void FinalizationRegistry::remove_swept_cells(Badge<Heap>, Vector<Cell*>& cells)
|
||||
{
|
||||
auto any_cells_were_sweeped = false;
|
||||
auto any_cells_were_swept = false;
|
||||
for (auto cell : cells) {
|
||||
for (auto& record : m_records) {
|
||||
if (record.target != cell)
|
||||
continue;
|
||||
record.target = nullptr;
|
||||
any_cells_were_sweeped = true;
|
||||
any_cells_were_swept = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (any_cells_were_sweeped)
|
||||
if (any_cells_were_swept)
|
||||
vm().enqueue_finalization_registry_cleanup_job(*this);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
bool remove_by_token(Object& unregister_token);
|
||||
void cleanup(FunctionObject* callback = nullptr);
|
||||
|
||||
virtual void remove_sweeped_cells(Badge<Heap>, Vector<Cell*>&) override;
|
||||
virtual void remove_swept_cells(Badge<Heap>, Vector<Cell*>&) override;
|
||||
|
||||
private:
|
||||
virtual void visit_edges(Visitor& visitor) override;
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
deregister();
|
||||
}
|
||||
|
||||
virtual void remove_sweeped_cells(Badge<Heap>, Vector<Cell*>&) = 0;
|
||||
virtual void remove_swept_cells(Badge<Heap>, Vector<Cell*>&) = 0;
|
||||
|
||||
protected:
|
||||
void deregister()
|
||||
|
|
|
@ -23,7 +23,7 @@ WeakMap::~WeakMap()
|
|||
{
|
||||
}
|
||||
|
||||
void WeakMap::remove_sweeped_cells(Badge<Heap>, Vector<Cell*>& cells)
|
||||
void WeakMap::remove_swept_cells(Badge<Heap>, Vector<Cell*>& cells)
|
||||
{
|
||||
for (auto* cell : cells)
|
||||
m_values.remove(cell);
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
HashMap<Cell*, Value> const& values() const { return m_values; };
|
||||
HashMap<Cell*, Value>& values() { return m_values; };
|
||||
|
||||
virtual void remove_sweeped_cells(Badge<Heap>, Vector<Cell*>&) override;
|
||||
virtual void remove_swept_cells(Badge<Heap>, Vector<Cell*>&) override;
|
||||
|
||||
private:
|
||||
HashMap<Cell*, Value> m_values; // This stores Cell pointers instead of Object pointers to aide with sweeping
|
||||
|
|
|
@ -25,7 +25,7 @@ WeakRef::~WeakRef()
|
|||
{
|
||||
}
|
||||
|
||||
void WeakRef::remove_sweeped_cells(Badge<Heap>, Vector<Cell*>& cells)
|
||||
void WeakRef::remove_swept_cells(Badge<Heap>, Vector<Cell*>& cells)
|
||||
{
|
||||
VERIFY(m_value);
|
||||
for (auto* cell : cells) {
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
|
||||
void update_execution_generation() { m_last_execution_generation = vm().execution_generation(); };
|
||||
|
||||
virtual void remove_sweeped_cells(Badge<Heap>, Vector<Cell*>&) override;
|
||||
virtual void remove_swept_cells(Badge<Heap>, Vector<Cell*>&) override;
|
||||
|
||||
private:
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
|
|
@ -23,7 +23,7 @@ WeakSet::~WeakSet()
|
|||
{
|
||||
}
|
||||
|
||||
void WeakSet::remove_sweeped_cells(Badge<Heap>, Vector<Cell*>& cells)
|
||||
void WeakSet::remove_swept_cells(Badge<Heap>, Vector<Cell*>& cells)
|
||||
{
|
||||
for (auto* cell : cells)
|
||||
m_values.remove(cell);
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
HashTable<Cell*> const& values() const { return m_values; };
|
||||
HashTable<Cell*>& values() { return m_values; };
|
||||
|
||||
virtual void remove_sweeped_cells(Badge<Heap>, Vector<Cell*>&) override;
|
||||
virtual void remove_swept_cells(Badge<Heap>, Vector<Cell*>&) override;
|
||||
|
||||
private:
|
||||
HashTable<Cell*> m_values; // This stores Cell pointers instead of Object pointers to aide with sweeping
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue