LibWeb: Only set prototype once for object with IDL interface

Before this change, we were going through the chain of base classes for
each IDL interface object and having them set the prototype to their
prototype.

Instead of doing that, reorder things so that we set the right prototype
immediately in Foo::initialize(), and then don't bother in all the base
class overrides.

This knocks off a ~1% profile item on Speedometer 3.
This commit is contained in:
Andreas Kling 2025-04-20 16:22:57 +02:00 committed by Andreas Kling
parent 7884e58b5c
commit a6dfc74e93
Notes: github-actions[bot] 2025-04-20 16:44:17 +00:00
417 changed files with 423 additions and 423 deletions

View file

@ -38,8 +38,8 @@ void HTMLDetailsElement::visit_edges(Cell::Visitor& visitor)
void HTMLDetailsElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
WEB_SET_PROTOTYPE_FOR_INTERFACE(HTMLDetailsElement);
Base::initialize(realm);
}
// https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element:html-element-insertion-steps