mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-25 22:13:13 +00:00
Shell: Avoid moving AK::Function instances while inside them
This commit is contained in:
committed by
Andreas Kling
parent
d954c11f66
commit
fdfa5c0bc7
@@ -2037,7 +2037,7 @@ bool Parser::parse_heredoc_entries()
|
||||
// until we find a line that contains the key
|
||||
auto end_condition = move(m_end_condition);
|
||||
found_key = false;
|
||||
set_end_condition([this, end = record.end, &found_key] {
|
||||
set_end_condition(make<Function<bool()>>([this, end = record.end, &found_key] {
|
||||
if (found_key)
|
||||
return true;
|
||||
auto offset = current_position();
|
||||
@@ -2060,7 +2060,7 @@ bool Parser::parse_heredoc_entries()
|
||||
}
|
||||
restore_to(offset.offset, offset.line);
|
||||
return false;
|
||||
});
|
||||
}));
|
||||
|
||||
auto expr = parse_doublequoted_string_inner();
|
||||
set_end_condition(move(end_condition));
|
||||
|
||||
Reference in New Issue
Block a user