| | 1 | 2002-08-24 Darin Adler <darin@apple.com> |
| | 2 | |
| | 3 | - fixed 3032072 -- Crash on reload in DOM::DocumentImpl::~DocumentImpl [unified]() |
| | 4 | |
| | 5 | This was a tough one to debug. |
| | 6 | Turned out to be a subtle bug in our new QConstString implementation. |
| | 7 | |
| | 8 | * kwq/KWQString.mm: |
| | 9 | (QStringData::makeAscii): Don't invalidate the Unicode buffer unless the ASCII |
| | 10 | buffer is taking over the internal buffer from the Unicode. In other cases, it's |
| | 11 | important not to invalidate the Unicode because it can result in the Unicode being |
| | 12 | freed and re-created when unicode() is called, which is disastrous in the QConstString |
| | 13 | case because we can't free the Unicode. |
| | 14 | (QStringData::makeUnicode): Make the corresponding change for ASCII too. In this |
| | 15 | case, it's just an optimization, not a bug fix. |
| | 16 | (QString::insert), (QString::remove), (QString::fill), (QString::operator+=): |
| | 17 | Mark the other string invalid whenever we modify either the ASCII or the Unicode |
| | 18 | string. This was handled correctly for some operations before, but not all, and it |
| | 19 | now matters because makeAscii and makeUnicode will now allow this state. |
| | 20 | |
| | 21 | Fixed a separate QString problem; I think I may have introduced this one. |
| | 22 | |
| | 23 | * kwq/KWQString.mm: |
| | 24 | (QString::getNSString): Since by ASCII, we actually mean ISO Latin 1, we can't use |
| | 25 | [NSString stringWithCString:]. Use CFStringCreateWithCString instead, pass |
| | 26 | CFStringCreateWithCString as the encoding, and use autorelease. We shouldn't really |
| | 27 | use the term ASCII in this class for the 8-bit-per-character buffer. Something more |
| | 28 | like Latin1 would be a more accurate way to refer to it. Maybe I'll do that renaming |
| | 29 | after talking to Richard about it on Monday. |
| | 30 | |
| | 31 | Fixed a small storage leak. |
| | 32 | |
| | 33 | * khtml/css/css_valueimpl.cpp: (CSSPrimitiveValueImpl::cleanup): Added braces to |
| | 34 | fix obviously-incorrect if/else grouping. |
| | 35 | |