Index: Source/platform/graphics/paint/DisplayItemList.cpp |
diff --git a/Source/platform/graphics/paint/DisplayItemList.cpp b/Source/platform/graphics/paint/DisplayItemList.cpp |
index 03b0ce50bbf8943f60766cdc54d5e63c4073bfba..9bc59d9234b9bf8eea9ed9d8629fbe39091859df 100644 |
--- a/Source/platform/graphics/paint/DisplayItemList.cpp |
+++ b/Source/platform/graphics/paint/DisplayItemList.cpp |
@@ -117,8 +117,9 @@ void DisplayItemList::endScope() |
void DisplayItemList::invalidate(DisplayItemClient client) |
{ |
ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); |
- // Can only be called during layout/paintInvalidation, not during painting. |
- ASSERT(m_newDisplayItems.isEmpty()); |
+ // Paint invalidation may occur before or during painting. If the latter, |
+ // we should not invalidate any client which has already has display items. |
+ ASSERT(!m_newDisplayItemIndicesByClient.contains(client)); |
updateValidlyCachedClientsIfNeeded(); |
m_validlyCachedClients.remove(client); |
updateSubtreeIndicesByClientIfNeeded(); |