static void showUnderInvalidationError(const char* reason, const DisplayItem& displayItem) { #ifndef NDEBUG WTFLogAlways("%s: %s\nSee http://crbug.com/450725.", reason, displayItem.asDebugString().utf8().data()); #else WTFLogAlways("%s. Run debug build to get more details\nSee http://crbug.com/450725.", reason); #endif // NDEBUG }
void PaintController::processNewItem(DisplayItem& displayItem) { ASSERT(!m_constructionDisabled); ASSERT(!skippingCache() || !displayItem.isCached()); if (displayItem.isCached()) ++m_numCachedNewItems; #if ENABLE(ASSERT) // Verify noop begin/end pairs have been removed. if (m_newDisplayItemList.size() >= 2 && displayItem.isEnd()) { const auto& beginDisplayItem = m_newDisplayItemList[m_newDisplayItemList.size() - 2]; if (beginDisplayItem.isBegin() && beginDisplayItem.type() != DisplayItem::Subsequence && !beginDisplayItem.drawsContent()) ASSERT(!displayItem.isEndAndPairedWith(beginDisplayItem.type())); } #endif if (!m_scopeStack.isEmpty()) displayItem.setScope(m_scopeStack.last()); #if ENABLE(ASSERT) size_t index = findMatchingItemFromIndex(displayItem.nonCachedId(), m_newDisplayItemIndicesByClient, m_newDisplayItemList); if (index != kNotFound) { #ifndef NDEBUG showDebugData(); WTFLogAlways("DisplayItem %s has duplicated id with previous %s (index=%d)\n", displayItem.asDebugString().utf8().data(), m_newDisplayItemList[index].asDebugString().utf8().data(), static_cast<int>(index)); #endif ASSERT_NOT_REACHED(); } addItemToIndexIfNeeded(displayItem, m_newDisplayItemList.size() - 1, m_newDisplayItemIndicesByClient); #endif // ENABLE(ASSERT) if (skippingCache()) displayItem.setSkippedCache(); if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) m_newPaintChunks.incrementDisplayItemIndex(); }