Changeset 27153 in webkit for trunk/JavaScriptCore/kjs/identifier.cpp
- Timestamp:
- Oct 27, 2007, 12:20:25 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/identifier.cpp
r27146 r27153 126 126 PassRefPtr<UString::Rep> Identifier::add(const char *c) 127 127 { 128 if (!c) 128 if (!c) { 129 UString::Rep::null.hash(); 129 130 return &UString::Rep::null; 130 size_t length = strlen(c); 131 if (length == 0) 131 } 132 133 if (!c[0]) { 134 UString::Rep::empty.hash(); 132 135 return &UString::Rep::empty; 136 } 133 137 134 138 return *identifierTable().add<const char *, CStringTranslator>(c).first; … … 169 173 PassRefPtr<UString::Rep> Identifier::add(const UChar *s, int length) 170 174 { 171 if (length == 0) 175 if (!length) { 176 UString::Rep::empty.hash(); 172 177 return &UString::Rep::empty; 178 } 173 179 174 180 UCharBuffer buf = {s, length};
Note:
See TracChangeset
for help on using the changeset viewer.