LibWeb: Give the DOM Window object a (weak) pointer to its JS wrapper

This commit is contained in:
Andreas Kling 2020-06-20 17:45:27 +02:00
commit cc5cba90db
Notes: sideshowbarker 2024-07-19 05:31:29 +09:00
4 changed files with 20 additions and 7 deletions

View file

@ -26,13 +26,16 @@
#pragma once
#include <AK/Weakable.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibWeb/Forward.h>
namespace Web {
namespace Bindings {
class WindowObject final : public JS::GlobalObject {
class WindowObject final
: public JS::GlobalObject
, public Weakable<WindowObject> {
public:
explicit WindowObject(Window&);
virtual void initialize() override;