mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 01:53:20 +00:00
LibJS+LibWeb: Use GC::Weak instead of AK::WeakPtr for GC-allocated types
This makes some common types like JS::Object smaller (by 8 bytes) and yields a minor speed improvement on many benchmarks.
This commit is contained in:
parent
25a5ed94d6
commit
dfa796a4e4
Notes:
github-actions[bot]
2025-10-17 15:25:08 +00:00
Author: https://github.com/awesomekling
Commit: dfa796a4e4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6496
36 changed files with 111 additions and 115 deletions
|
|
@ -480,7 +480,7 @@ void HTMLSelectElement::show_the_picker_if_applicable()
|
|||
}
|
||||
|
||||
// Request select dropdown
|
||||
auto weak_element = make_weak_ptr<HTMLSelectElement>();
|
||||
auto weak_element = GC::Weak<HTMLSelectElement> { *this };
|
||||
auto rect = get_bounding_client_rect();
|
||||
auto position = document().navigable()->to_top_level_position(Web::CSSPixelPoint { rect.x(), rect.bottom() });
|
||||
document().page().did_request_select_dropdown(weak_element, position, rect.width(), m_select_items);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue