mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
LibWeb+Assistant: Do not ref-capture stack vars in deferred lambdas
This commit is contained in:
parent
76fa127cbf
commit
31c5cdcbd5
Notes:
sideshowbarker
2024-07-17 21:16:31 +09:00
Author: https://github.com/mattco98
Commit: 31c5cdcbd5
Pull-request: https://github.com/SerenityOS/serenity/pull/23876
Issue: https://github.com/SerenityOS/serenity/issues/23791
Reviewed-by: https://github.com/awesomekling
2 changed files with 2 additions and 2 deletions
|
@ -258,7 +258,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
}
|
||||
|
||||
mark_selected_item();
|
||||
Core::deferred_invoke([&] { window->resize(GUI::Desktop::the().rect().width() / 3, {}); });
|
||||
Core::deferred_invoke([window] { window->resize(GUI::Desktop::the().rect().width() / 3, {}); });
|
||||
}));
|
||||
|
||||
db.on_new_results = [&](auto results) {
|
||||
|
|
|
@ -664,7 +664,7 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain
|
|||
m_margin_state.reset();
|
||||
} else if (!m_margin_state.has_block_container_waiting_for_final_y_position()) {
|
||||
// margin-top of block container can be updated during children layout hence it's final y position yet to be determined
|
||||
m_margin_state.register_block_container_y_position_update_callback([&](CSSPixels margin_top) {
|
||||
m_margin_state.register_block_container_y_position_update_callback([&, introduce_clearance](CSSPixels margin_top) {
|
||||
if (introduce_clearance == DidIntroduceClearance::No) {
|
||||
place_block_level_element_in_normal_flow_vertically(box, margin_top + y);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue