Changeset 55825 in webkit for trunk/JavaScriptCore/runtime/UStringImpl.h
- Timestamp:
- Mar 10, 2010, 6:36:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/UStringImpl.h
r55679 r55825 114 114 return adoptRef(new UStringImpl(vector.releaseBuffer(), length)); 115 115 } 116 return &empty(); 117 } 118 116 return empty(); 117 } 118 119 static PassRefPtr<UStringImpl> create(const UChar* buffer, unsigned length); 120 static PassRefPtr<UStringImpl> create(const char* c, unsigned length); 119 121 static PassRefPtr<UStringImpl> create(const char* c); 120 static PassRefPtr<UStringImpl> create(const char* c, unsigned length);121 static PassRefPtr<UStringImpl> create(const UChar* buffer, unsigned length);122 122 123 123 static PassRefPtr<UStringImpl> create(PassRefPtr<UStringImpl> rep, unsigned offset, unsigned length) … … 137 137 if (!length) { 138 138 output = 0; 139 return &empty();139 return empty(); 140 140 } 141 141 … … 151 151 if (!length) { 152 152 output = 0; 153 return &empty();153 return empty(); 154 154 } 155 155 … … 204 204 static unsigned computeHash(const char* s) { return WTF::stringHash(s); } 205 205 206 static UStringImpl & empty() { return *s_empty; }206 static UStringImpl* empty(); 207 207 208 208 ALWAYS_INLINE void checkConsistency() const … … 296 296 mutable unsigned m_hash; 297 297 298 JS_EXPORTDATA static UStringImpl* s_empty;299 300 298 friend class JIT; 301 299 friend class SmallStringsStorage;
Note:
See TracChangeset
for help on using the changeset viewer.