LibWeb: Construct the IDL interface prototype chains automatically

Have each IDL prototype trigger the construction of its own prototype.
This commit is contained in:
Andreas Kling 2021-01-18 11:36:34 +01:00
commit 630cbc947a
Notes: sideshowbarker 2024-07-18 23:07:32 +09:00
3 changed files with 47 additions and 11 deletions

View file

@ -217,13 +217,9 @@
#include <LibWeb/Bindings/UIEventConstructor.h>
#include <LibWeb/Bindings/UIEventPrototype.h>
#define ADD_WINDOW_OBJECT_INTERFACE(name) \
{ \
auto* prototype = heap().allocate<name##Prototype>(*this, *this); \
name##Constructor* constructor = nullptr; \
add_constructor(#name, constructor, prototype); \
set_web_prototype(#name, prototype); \
set_web_constructor(#name, constructor); \
#define ADD_WINDOW_OBJECT_INTERFACE(name) \
{ \
ensure_web_constructor<name##Constructor>(#name); \
}
#define ADD_WINDOW_OBJECT_INTERFACES \