From f6c61940f6569d095a028f73bc8a1b00702275ec Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 27 Aug 2022 13:53:31 +0200 Subject: LibWeb: Add PlatformObject class This represents the "platform object" concept from the IDL spec, which refers to an object that implements an IDL interface. --- Userland/Libraries/LibWeb/Bindings/Wrapper.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'Userland/Libraries/LibWeb/Bindings/Wrapper.h') diff --git a/Userland/Libraries/LibWeb/Bindings/Wrapper.h b/Userland/Libraries/LibWeb/Bindings/Wrapper.h index 2ac7c4851c..86b39899c9 100644 --- a/Userland/Libraries/LibWeb/Bindings/Wrapper.h +++ b/Userland/Libraries/LibWeb/Bindings/Wrapper.h @@ -1,29 +1,27 @@ /* - * Copyright (c) 2020, Andreas Kling + * Copyright (c) 2020-2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once -#include #include -#include +#include #include namespace Web::Bindings { class Wrapper - : public JS::Object + : public PlatformObject , public Weakable { - JS_OBJECT(Wrapper, JS::Object); + JS_OBJECT(Wrapper, PlatformObject); public: + virtual ~Wrapper() override; + protected: - explicit Wrapper(Object& prototype) - : Object(prototype) - { - } + explicit Wrapper(Object& prototype); }; } -- cgit v1.2.3