1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:57:44 +00:00

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
parent ee7fa49b88
commit 630cbc947a
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 \