Handle.cpp 410 B

123456789101112131415161718192021222324
  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/Runtime/VM.h>
  9. namespace JS {
  10. HandleImpl::HandleImpl(Cell* cell)
  11. : m_cell(cell)
  12. {
  13. m_cell->heap().did_create_handle({}, *this);
  14. }
  15. HandleImpl::~HandleImpl()
  16. {
  17. m_cell->heap().did_destroy_handle({}, *this);
  18. }
  19. }