LibWeb: Add a little assertion in Document::detach_from_frame()

Let's just assert that we're detaching from the frame we thought we
were in.. just in case.
This commit is contained in:
Andreas Kling 2020-12-14 13:47:07 +01:00
parent 34d0141da3
commit bceb5b60f7
Notes: sideshowbarker 2024-07-19 00:52:57 +09:00

View file

@ -288,6 +288,7 @@ void Document::attach_to_frame(Badge<Frame>, Frame& frame)
void Document::detach_from_frame(Badge<Frame>, Frame& frame)
{
ASSERT(&frame == m_frame);
tear_down_layout_tree();
m_frame = nullptr;
}