Index: Source/platform/graphics/paint/DisplayItem.cpp |
diff --git a/Source/platform/graphics/paint/DisplayItem.cpp b/Source/platform/graphics/paint/DisplayItem.cpp |
index 25b0bcf79e4bb6e243f672e6e88edb6c865b86af..02f68c31d4a4828b05f76d75efc8078b89147327 100644 |
--- a/Source/platform/graphics/paint/DisplayItem.cpp |
+++ b/Source/platform/graphics/paint/DisplayItem.cpp |
@@ -203,8 +203,6 @@ WTF::String DisplayItem::typeAsDebugString(Type type) |
WTF::String DisplayItem::asDebugString() const |
{ |
- if (!isValid()) |
- return "null"; |
WTF::StringBuilder stringBuilder; |
stringBuilder.append('{'); |
dumpPropertiesAsDebugString(stringBuilder); |
@@ -214,7 +212,13 @@ WTF::String DisplayItem::asDebugString() const |
void DisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) const |
{ |
- ASSERT(isValid()); |
+ if (!isValid()) { |
+ stringBuilder.append("valid: false, originalDebugString: "); |
+ // This is the original debug string which is in json format. |
+ stringBuilder.append(clientDebugString()); |
+ return; |
+ } |
+ |
stringBuilder.append(String::format("client: \"%p", client())); |
if (!clientDebugString().isEmpty()) { |
stringBuilder.append(' '); |