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

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

Issue 1323263002: Show debug information for invalid display items (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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.cpp » ('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 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(' ');
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.h ('k') | Source/platform/graphics/paint/DisplayItemList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698