ladybird/Libraries/LibJS/Heap/Handle.cpp

26 lines
469 B
C++
Raw Normal View History

2020-03-18 16:21:06 -03:00
/*
* Copyright (c) 2020, Andreas Kling <andreas@ladybird.org>
2020-03-18 16:21:06 -03:00
*
* SPDX-License-Identifier: BSD-2-Clause
2020-03-18 16:21:06 -03:00
*/
#include <LibJS/Heap/CellImpl.h>
#include <LibJS/Heap/Handle.h>
#include <LibJS/Heap/Heap.h>
namespace JS {
HandleImpl::HandleImpl(CellImpl* cell, SourceLocation location)
: m_cell(cell)
, m_location(location)
{
m_cell->heap().did_create_handle({}, *this);
}
HandleImpl::~HandleImpl()
{
m_cell->heap().did_destroy_handle({}, *this);
}
}