Changeset 27153 in webkit for trunk/JavaScriptCore/kjs/ustring.cpp
- Timestamp:
- Oct 27, 2007, 12:20:25 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ustring.cpp
r26688 r27153 422 422 return; 423 423 } 424 size_t length = strlen(c); 425 if ( length == 0) {424 425 if (!c[0]) { 426 426 m_rep = &Rep::empty; 427 427 return; 428 428 } 429 430 size_t length = strlen(c); 429 431 UChar *d = allocChars(length); 430 432 if (!d) … … 898 900 } 899 901 900 int l = static_cast<int>(strlen(c)); 901 if (!l) { 902 if (!c[0]) { 902 903 m_rep = &Rep::empty; 903 904 return *this; 904 905 } 905 906 907 int l = static_cast<int>(strlen(c)); 906 908 UChar *d; 907 909 if (m_rep->rc == 1 && l <= m_rep->capacity && m_rep->baseIsSelf() && m_rep->offset == 0 && m_rep->preCapacity == 0) {
Note:
See TracChangeset
for help on using the changeset viewer.