Changeset 87438 in webkit


Ignore:
Timestamp:
May 26, 2011 3:09:55 PM (13 years ago)
Author:
rniwa@webkit.org
Message:

2011-05-26 Ryosuke Niwa <rniwa@webkit.org>

Reviewed by Eric Seidel.

[debug feature] WTFString should have show() method
https://bugs.webkit.org/show_bug.cgi?id=61149

Added String::show and AtomicString::show in NDEBUG.

  • wtf/text/AtomicString.cpp: (WTF::AtomicString::show):
  • wtf/text/AtomicString.h:
  • wtf/text/WTFString.cpp: (String::show):
  • wtf/text/WTFString.h:
Location:
trunk/Source/JavaScriptCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r87434 r87438  
     12011-05-26  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [debug feature] WTFString should have show() method
     6        https://bugs.webkit.org/show_bug.cgi?id=61149
     7
     8        Added String::show and AtomicString::show in NDEBUG.
     9
     10        * wtf/text/AtomicString.cpp:
     11        (WTF::AtomicString::show):
     12        * wtf/text/AtomicString.h:
     13        * wtf/text/WTFString.cpp:
     14        (String::show):
     15        * wtf/text/WTFString.h:
     16
    1172011-05-26  Geoffrey Garen  <ggaren@apple.com>
    218
  • trunk/Source/JavaScriptCore/wtf/text/AtomicString.cpp

    r83407 r87438  
    366366}
    367367
     368#ifndef NDEBUG
     369void AtomicString::show()
     370{
     371    m_string.show();
     372}
     373#endif
     374
    368375} // namespace WTF
  • trunk/Source/JavaScriptCore/wtf/text/AtomicString.h

    r86330 r87438  
    114114    static AtomicString fromUTF8(const char*);
    115115
     116#ifndef NDEBUG
     117    void show();
     118#endif
    116119private:
    117120    String m_string;
  • trunk/Source/JavaScriptCore/wtf/text/WTFString.cpp

    r86330 r87438  
    965965Vector<char> asciiDebug(String& string);
    966966
     967void String::show()
     968{
     969    fprintf(stderr, "%s\n", asciiDebug(impl()).data());
     970}
     971
    967972String* string(const char* s)
    968973{
  • trunk/Source/JavaScriptCore/wtf/text/WTFString.h

    r87269 r87438  
    347347    String(WTF::HashTableDeletedValueType) : m_impl(WTF::HashTableDeletedValue) { }
    348348    WTF_EXPORT_PRIVATE bool isHashTableDeletedValue() const { return m_impl.isHashTableDeletedValue(); }
     349
     350#ifndef NDEBUG
     351    void show();
     352#endif
    349353
    350354private:
Note: See TracChangeset for help on using the changeset viewer.