mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
AK: Add NOTE about VERIFY in Function::clear
This commit is contained in:
parent
22d7e57955
commit
eecbcff6af
Notes:
sideshowbarker
2024-07-18 11:32:02 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/eecbcff6af6 Pull-request: https://github.com/SerenityOS/serenity/pull/8243
1 changed files with 1 additions and 0 deletions
|
@ -189,6 +189,7 @@ private:
|
|||
void clear(bool may_defer = true)
|
||||
{
|
||||
bool called_from_inside_function = m_call_nesting_level > 0;
|
||||
// NOTE: This VERIFY could fail because a Function is destroyed from within itself.
|
||||
VERIFY(may_defer || !called_from_inside_function);
|
||||
if (called_from_inside_function && may_defer) {
|
||||
m_deferred_clear = true;
|
||||
|
|
Loading…
Reference in a new issue