summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-12-14 13:47:07 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-14 13:47:07 +0100
commitbceb5b60f7900651fada13a495419c741afe10ae (patch)
treed8a03cacfee2536a6df66d2bd22ddd535eabfb71
parent34d0141da39fef8e0b394622412dcfaa216293ff (diff)
downloadserenity-bceb5b60f7900651fada13a495419c741afe10ae.zip
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.
-rw-r--r--Libraries/LibWeb/DOM/Document.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp
index a85a23d280..d7eabb3837 100644
--- a/Libraries/LibWeb/DOM/Document.cpp
+++ b/Libraries/LibWeb/DOM/Document.cpp
@@ -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;
}