<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[265630] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/265630">265630</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2020-08-13 15:28:42 -0700 (Thu, 13 Aug 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add RenderTreeMutationDisallowedScope to track intrusive render tree mutations
https://bugs.webkit.org/show_bug.cgi?id=215463
<rdar://problem/67012831>

Reviewed by Simon Fraser.

RenderLayer::enclosingScrollableLayer should not mutate the render tree accidentally.
This is related to <rdar://problem/64739768>.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderTreeMutationDisallowedScope.cpp: Added.
* rendering/RenderTreeMutationDisallowedScope.h: Added.
(WebCore::RenderTreeMutationDisallowedScope::RenderTreeMutationDisallowedScope):
(WebCore::RenderTreeMutationDisallowedScope::~RenderTreeMutationDisallowedScope):
(WebCore::RenderTreeMutationDisallowedScope::isMutationAllowed):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::destroy):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreSourcestxt">trunk/Source/WebCore/Sources.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingupdatingRenderTreeBuildercpp">trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorerenderingRenderTreeMutationDisallowedScopecpp">trunk/Source/WebCore/rendering/RenderTreeMutationDisallowedScope.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTreeMutationDisallowedScopeh">trunk/Source/WebCore/rendering/RenderTreeMutationDisallowedScope.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (265629 => 265630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2020-08-13 22:20:04 UTC (rev 265629)
+++ trunk/Source/WebCore/ChangeLog      2020-08-13 22:28:42 UTC (rev 265630)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2020-08-13  Zalan Bujtas  <zalan@apple.com>
+
+        Add RenderTreeMutationDisallowedScope to track intrusive render tree mutations
+        https://bugs.webkit.org/show_bug.cgi?id=215463
+        <rdar://problem/67012831>
+
+        Reviewed by Simon Fraser.
+
+        RenderLayer::enclosingScrollableLayer should not mutate the render tree accidentally.
+        This is related to <rdar://problem/64739768>.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/RenderTreeMutationDisallowedScope.cpp: Added.
+        * rendering/RenderTreeMutationDisallowedScope.h: Added.
+        (WebCore::RenderTreeMutationDisallowedScope::RenderTreeMutationDisallowedScope):
+        (WebCore::RenderTreeMutationDisallowedScope::~RenderTreeMutationDisallowedScope):
+        (WebCore::RenderTreeMutationDisallowedScope::isMutationAllowed):
+        * rendering/updating/RenderTreeBuilder.cpp:
+        (WebCore::RenderTreeBuilder::destroy):
+
</ins><span class="cx"> 2020-08-13  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r260684): Messages YouTube inline video: after Multitasking away and Back, Audio is heard but icon indicates "muted"
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Sources.txt (265629 => 265630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Sources.txt 2020-08-13 22:20:04 UTC (rev 265629)
+++ trunk/Source/WebCore/Sources.txt    2020-08-13 22:28:42 UTC (rev 265630)
</span><span class="lines">@@ -2171,6 +2171,7 @@
</span><span class="cx"> rendering/RenderTextLineBoxes.cpp
</span><span class="cx"> rendering/RenderTheme.cpp
</span><span class="cx"> rendering/RenderTreeAsText.cpp
</span><ins>+rendering/RenderTreeMutationDisallowedScope.cpp
</ins><span class="cx"> rendering/RenderVTTCue.cpp
</span><span class="cx"> rendering/RenderVideo.cpp
</span><span class="cx"> rendering/RenderView.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (265629 => 265630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2020-08-13 22:20:04 UTC (rev 265629)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2020-08-13 22:28:42 UTC (rev 265630)
</span><span class="lines">@@ -385,6 +385,7 @@
</span><span class="cx">          115CFA82208B8EDA001E6991 /* FloatingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 115CFA80208B8EDA001E6991 /* FloatingState.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          115CFA86208B9066001E6991 /* FloatingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 115CFA84208B9066001E6991 /* FloatingContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          115CFA97208B952B001E6991 /* LayoutBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 115CFA95208B952B001E6991 /* LayoutBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+               1163F82424E5D5AE000AB960 /* RenderTreeMutationDisallowedScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 1163F82124E5D59B000AB960 /* RenderTreeMutationDisallowedScope.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           119340791FE8B92300935F1E /* RenderTreeBuilderTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 119340771FE8B92300935F1E /* RenderTreeBuilderTable.h */; };
</span><span class="cx">          1193408A1FEB355D00935F1E /* RenderTreeBuilderRuby.h in Headers */ = {isa = PBXBuildFile; fileRef = 119340881FEB355D00935F1E /* RenderTreeBuilderRuby.h */; };
</span><span class="cx">          119340971FED715500935F1E /* RenderTreeBuilderFormControls.h in Headers */ = {isa = PBXBuildFile; fileRef = 119340951FED715500935F1E /* RenderTreeBuilderFormControls.h */; };
</span><span class="lines">@@ -6091,6 +6092,8 @@
</span><span class="cx">          115CFA89208B921A001E6991 /* BlockMarginCollapse.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = BlockMarginCollapse.cpp; sourceTree = "<group>"; };
</span><span class="cx">          115CFA95208B952B001E6991 /* LayoutBox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutBox.h; sourceTree = "<group>"; };
</span><span class="cx">          115CFA96208B952B001E6991 /* LayoutBox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutBox.cpp; sourceTree = "<group>"; };
</span><ins>+               1163F82124E5D59B000AB960 /* RenderTreeMutationDisallowedScope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RenderTreeMutationDisallowedScope.h; sourceTree = "<group>"; };
+               1163F82324E5D59B000AB960 /* RenderTreeMutationDisallowedScope.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTreeMutationDisallowedScope.cpp; sourceTree = "<group>"; };
</ins><span class="cx">           119340761FE8B92300935F1E /* RenderTreeBuilderTable.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTreeBuilderTable.cpp; sourceTree = "<group>"; };
</span><span class="cx">          119340771FE8B92300935F1E /* RenderTreeBuilderTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RenderTreeBuilderTable.h; sourceTree = "<group>"; };
</span><span class="cx">          119340871FEB355D00935F1E /* RenderTreeBuilderRuby.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTreeBuilderRuby.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -28863,6 +28866,8 @@
</span><span class="cx">                          BCEA4849097D93020094C9E4 /* RenderThemeMac.mm */,
</span><span class="cx">                          93955A4203D72932008635CE /* RenderTreeAsText.cpp */,
</span><span class="cx">                          93955A4103D72932008635CE /* RenderTreeAsText.h */,
</span><ins>+                               1163F82324E5D59B000AB960 /* RenderTreeMutationDisallowedScope.cpp */,
+                               1163F82124E5D59B000AB960 /* RenderTreeMutationDisallowedScope.h */,
</ins><span class="cx">                           E4B41E330CBFB60900AF2ECE /* RenderVideo.cpp */,
</span><span class="cx">                          E4B41E340CBFB60900AF2ECE /* RenderVideo.h */,
</span><span class="cx">                          BCEA4828097D93020094C9E4 /* RenderView.cpp */,
</span><span class="lines">@@ -33222,6 +33227,7 @@
</span><span class="cx">                          E47C39331FE6E10800BBBC6B /* RenderTreeBuilderMultiColumn.h in Headers */,
</span><span class="cx">                          1193408A1FEB355D00935F1E /* RenderTreeBuilderRuby.h in Headers */,
</span><span class="cx">                          119340791FE8B92300935F1E /* RenderTreeBuilderTable.h in Headers */,
</span><ins>+                               1163F82424E5D5AE000AB960 /* RenderTreeMutationDisallowedScope.h in Headers */,
</ins><span class="cx">                           E47C392E1FE6E0F700BBBC6B /* RenderTreePosition.h in Headers */,
</span><span class="cx">                          E47C392F1FE6E0F900BBBC6B /* RenderTreeUpdater.h in Headers */,
</span><span class="cx">                          E47C39311FE6E10200BBBC6B /* RenderTreeUpdaterGeneratedContent.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (265629 => 265630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp   2020-08-13 22:20:04 UTC (rev 265629)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp      2020-08-13 22:28:42 UTC (rev 265630)
</span><span class="lines">@@ -111,6 +111,7 @@
</span><span class="cx"> #include "RenderText.h"
</span><span class="cx"> #include "RenderTheme.h"
</span><span class="cx"> #include "RenderTreeAsText.h"
</span><ins>+#include "RenderTreeMutationDisallowedScope.h"
</ins><span class="cx"> #include "RenderView.h"
</span><span class="cx"> #include "RuntimeEnabledFeatures.h"
</span><span class="cx"> #include "SVGNames.h"
</span><span class="lines">@@ -1865,6 +1866,8 @@
</span><span class="cx"> 
</span><span class="cx"> RenderLayer* RenderLayer::enclosingScrollableLayer(IncludeSelfOrNot includeSelf, CrossFrameBoundaries crossFrameBoundaries) const
</span><span class="cx"> {
</span><ins>+    RenderTreeMutationDisallowedScope renderTreeMutationDisallowedScope;
+
</ins><span class="cx">     auto isConsideredScrollable = [](const RenderLayer& layer) {
</span><span class="cx">         return is<RenderBox>(layer.renderer()) && downcast<RenderBox>(layer.renderer()).canBeScrolledAndHasScrollableArea();
</span><span class="cx">     };
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTreeMutationDisallowedScopecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/rendering/RenderTreeMutationDisallowedScope.cpp (0 => 265630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTreeMutationDisallowedScope.cpp                             (rev 0)
+++ trunk/Source/WebCore/rendering/RenderTreeMutationDisallowedScope.cpp        2020-08-13 22:28:42 UTC (rev 265630)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "RenderTreeMutationDisallowedScope.h"
+
+namespace WebCore {
+
+RenderTreeMutationDisallowedScope* RenderTreeMutationDisallowedScope::s_currentMutationAssertion = nullptr;
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTreeMutationDisallowedScopeh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/rendering/RenderTreeMutationDisallowedScope.h (0 => 265630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTreeMutationDisallowedScope.h                               (rev 0)
+++ trunk/Source/WebCore/rendering/RenderTreeMutationDisallowedScope.h  2020-08-13 22:28:42 UTC (rev 265630)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+class RenderTreeMutationDisallowedScope {
+public:
+    RenderTreeMutationDisallowedScope()
+        : m_previousMutationAssertion(s_currentMutationAssertion)
+    {
+        s_currentMutationAssertion = this;
+    }
+
+    ~RenderTreeMutationDisallowedScope()
+    {
+        s_currentMutationAssertion = m_previousMutationAssertion;
+    }
+
+    static bool isMutationAllowed() { return !s_currentMutationAssertion; }
+
+private:
+    RenderTreeMutationDisallowedScope* m_previousMutationAssertion { nullptr };
+    static RenderTreeMutationDisallowedScope* s_currentMutationAssertion;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingupdatingRenderTreeBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (265629 => 265630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp    2020-08-13 22:20:04 UTC (rev 265629)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp       2020-08-13 22:28:42 UTC (rev 265630)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> #include "RenderTreeBuilderRuby.h"
</span><span class="cx"> #include "RenderTreeBuilderSVG.h"
</span><span class="cx"> #include "RenderTreeBuilderTable.h"
</span><ins>+#include "RenderTreeMutationDisallowedScope.h"
</ins><span class="cx"> #include "RenderView.h"
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
</span><span class="lines">@@ -163,6 +164,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderTreeBuilder::destroy(RenderObject& renderer)
</span><span class="cx"> {
</span><ins>+    RELEASE_ASSERT(RenderTreeMutationDisallowedScope::isMutationAllowed());
</ins><span class="cx">     ASSERT(renderer.parent());
</span><span class="cx">     auto toDestroy = detach(*renderer.parent(), renderer);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>