mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
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:
committed by
Andreas Kling
parent
7884e58b5c
commit
a6dfc74e93
Notes:
github-actions[bot]
2025-04-20 16:44:17 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/a6dfc74e932 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4408
@@ -35,8 +35,8 @@ GC::Ref<IDBTransaction> IDBTransaction::create(JS::Realm& realm, GC::Ref<IDBData
|
||||
|
||||
void IDBTransaction::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(IDBTransaction);
|
||||
Base::initialize(realm);
|
||||
}
|
||||
|
||||
void IDBTransaction::visit_edges(Visitor& visitor)
|
||||
|
||||
Reference in New Issue
Block a user