Changeset 32222 in webkit for trunk/JavaScriptCore/kjs/ustring.cpp
- Timestamp:
- Apr 18, 2008, 12:46:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ustring.cpp
r31948 r32222 174 174 // These static strings are immutable, except for rc, whose initial value is chosen to reduce the possibility of it becoming zero due to ref/deref not being thread-safe. 175 175 static UChar sharedEmptyChar; 176 UString::Rep UString::Rep::null = { 0, 0, INT_MAX / 2, 0, false, true, &UString::Rep::null, 0, 0, 0, 0, 0, 0 };177 UString::Rep UString::Rep::empty = { 0, 0, INT_MAX / 2, 0, false, true, &UString::Rep::empty, 0, &sharedEmptyChar, 0, 0, 0, 0 };176 UString::Rep UString::Rep::null = { 0, 0, INT_MAX / 2, 0, 0, &UString::Rep::null, true, 0, 0, 0, 0, 0, 0 }; 177 UString::Rep UString::Rep::empty = { 0, 0, INT_MAX / 2, 0, 0, &UString::Rep::empty, true, 0, &sharedEmptyChar, 0, 0, 0, 0 }; 178 178 179 179 static char* statBuffer = 0; // Only used for debugging via UString::ascii(). … … 195 195 r->rc = 1; 196 196 r->_hash = 0; 197 r->isIdentifier = false; 197 r->identifierTable = 0; 198 r->baseString = r; 198 199 r->isStatic = false; 199 r->baseString = r;200 200 r->reportedCost = 0; 201 201 r->buf = d; … … 225 225 r->rc = 1; 226 226 r->_hash = 0; 227 r->isIdentifier = false; 227 r->identifierTable = 0; 228 r->baseString = base.releaseRef(); 228 229 r->isStatic = false; 229 r->baseString = base.releaseRef();230 230 r->reportedCost = 0; 231 231 r->buf = 0; … … 243 243 // Static null and empty strings can never be destroyed, but we cannot rely on reference counting, because ref/deref are not thread-safe. 244 244 if (!isStatic) { 245 if (i sIdentifier)245 if (identifierTable) 246 246 Identifier::remove(this); 247 247 if (baseString == this)
Note:
See TracChangeset
for help on using the changeset viewer.