Wrappable.cpp 347 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/Wrappable.h>
  7. #include <LibWeb/Bindings/Wrapper.h>
  8. namespace Web {
  9. namespace Bindings {
  10. void Wrappable::set_wrapper(Wrapper& wrapper)
  11. {
  12. VERIFY(!m_wrapper);
  13. m_wrapper = wrapper.make_weak_ptr();
  14. }
  15. }
  16. }