mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
LibWeb+Assistant: Do not ref-capture stack vars in deferred lambdas
This commit is contained in:
parent
76fa127cbf
commit
31c5cdcbd5
|
@ -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…
Reference in a new issue