Handle.cpp 439 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibJS/Heap/Cell.h>
  7. #include <LibJS/Heap/Handle.h>
  8. #include <LibJS/Heap/Heap.h>
  9. #include <LibJS/Runtime/VM.h>
  10. namespace JS {
  11. HandleImpl::HandleImpl(Cell* cell)
  12. : m_cell(cell)
  13. {
  14. m_cell->heap().did_create_handle({}, *this);
  15. }
  16. HandleImpl::~HandleImpl()
  17. {
  18. m_cell->heap().did_destroy_handle({}, *this);
  19. }
  20. }