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

Unified Diff: Source/platform/graphics/paint/DisplayItem.cpp

Issue 1287863003: Avoid re-iterate out-of-order display items (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « Source/platform/graphics/paint/DisplayItem.h ('k') | Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/DisplayItem.cpp
diff --git a/Source/platform/graphics/paint/DisplayItem.cpp b/Source/platform/graphics/paint/DisplayItem.cpp
index 81c92baa688fbad61cf60495dca338bf239d078d..315147e50412147b37c3d6cc029a6b04b2323b49 100644
--- a/Source/platform/graphics/paint/DisplayItem.cpp
+++ b/Source/platform/graphics/paint/DisplayItem.cpp
@@ -190,6 +190,8 @@ WTF::String DisplayItem::typeAsDebugString(Type type)
WTF::String DisplayItem::asDebugString() const
{
+ if (!isValid())
+ return "null";
WTF::StringBuilder stringBuilder;
stringBuilder.append('{');
dumpPropertiesAsDebugString(stringBuilder);
@@ -199,6 +201,7 @@ WTF::String DisplayItem::asDebugString() const
void DisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) const
{
+ ASSERT(isValid());
stringBuilder.append(String::format("client: \"%p", client()));
if (!clientDebugString().isEmpty()) {
stringBuilder.append(' ');
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.h ('k') | Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698