Changeset 19572 in webkit
- Timestamp:
- Feb 11, 2007 11:37:07 PM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r19571 r19572 1 2007-02-11 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Maciej 4 5 First in what will be a series of HistoryItem enhancements to help debugging 6 7 * history/HistoryItem.cpp: 8 (WebCore::HistoryItem::showTree): 9 (WebCore::HistoryItem::showTreeWithIndent): 10 (showTree): Outside of WebCore namespace, and extern "C" - to make even the 11 DWARF debugger able to find it... *sigh* 12 * history/HistoryItem.h: 13 1 14 2007-02-11 Eric Seidel <eric@webkit.org> 2 15 -
trunk/WebCore/history/HistoryItem.cpp
r18603 r19572 503 503 } 504 504 #ifndef NDEBUG 505 void HistoryItem::print() const 506 { 507 fprintf(stderr, "%s\n", m_urlString.ascii().data()); 505 int HistoryItem::showTree() const 506 { 507 return showTreeWithIndent(0); 508 } 509 510 int HistoryItem::showTreeWithIndent(unsigned indentLevel) const 511 { 512 String prefix(""); 513 int totalSubItems = 0; 514 unsigned i; 515 for (i = 0; i < indentLevel; ++i) 516 prefix.append(" "); 517 518 fprintf(stderr, "%s+-%s (%p)\n", prefix.ascii().data(), m_urlString.ascii().data(), this); 519 520 for (unsigned int i = 0; i < m_subItems.size(); ++i) { 521 totalSubItems += m_subItems[i]->showTreeWithIndent(indentLevel + 1); 522 } 523 return totalSubItems + 1; 508 524 } 509 525 #endif … … 511 527 }; //namespace WebCore 512 528 529 #ifndef NDEBUG 530 int showTree(const WebCore::HistoryItem* item) 531 { 532 return item->showTree(); 533 } 534 #endif 535 -
trunk/WebCore/history/HistoryItem.h
r18874 r19572 148 148 149 149 #ifndef NDEBUG 150 void print() const; 150 int showTree() const; 151 int showTreeWithIndent(unsigned indentLevel) const; 151 152 #endif 152 153 … … 191 192 } //namespace WebCore 192 193 194 #ifndef NDEBUG 195 // Outside the WebCore namespace for ease of invocation from gdb. 196 extern "C" int showTree(const WebCore::HistoryItem*); 197 #endif 198 193 199 #endif // HISTORYITEM_H
Note: See TracChangeset
for help on using the changeset viewer.