Chromium Code Reviews| 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..3f114622cffa72ea9f2c2339a89ad57ffbb3721d 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,12 @@ WTF::String DisplayItem::asDebugString() const |
| void DisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) const |
| { |
| - ASSERT(isValid()); |
| + if (!isValid()) { |
| + stringBuilder.append("valid: false, originalDebugString: "); |
| + stringBuilder.append(clientDebugString()); |
|
pdr.
2015/09/03 01:59:20
Can you add quotes around this so it's valid-ish j
Xianzhu
2015/09/03 05:48:44
It's the original display item's debug string whic
|
| + return; |
| + } |
| + |
| stringBuilder.append(String::format("client: \"%p", client())); |
| if (!clientDebugString().isEmpty()) { |
| stringBuilder.append(' '); |