Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Unified Diff: Source/WebCore/rendering/RenderObjectChildList.cpp

Issue 12042093: Merge 139788 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/css-generated-content/bug-106384-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderObjectChildList.cpp
===================================================================
--- Source/WebCore/rendering/RenderObjectChildList.cpp (revision 140738)
+++ Source/WebCore/rendering/RenderObjectChildList.cpp (working copy)
@@ -153,10 +153,17 @@
}
ASSERT(!child->parent());
- while (beforeChild->parent() != owner && beforeChild->parent()->isAnonymousBlock())
+ while (beforeChild->parent() && beforeChild->parent() != owner)
beforeChild = beforeChild->parent();
- ASSERT(beforeChild->parent() == owner);
+ // This should never happen, but if it does prevent render tree corruption
+ // where child->parent() ends up being owner but child->nextSibling()->parent()
+ // is not owner.
+ if (beforeChild->parent() != owner) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
ASSERT(!owner->isBlockFlow() || (!child->isTableSection() && !child->isTableRow() && !child->isTableCell()));
if (beforeChild == firstChild())
« no previous file with comments | « LayoutTests/fast/css-generated-content/bug-106384-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698