Changeset 31080 in webkit
- Timestamp:
- Mar 16, 2008 1:15:41 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r31079 r31080 1 2008-03-16 Darin Adler <darin@apple.com> 2 3 Reviewed by Mitz. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=17876 6 Attempting to visit Ofcom page causes crash 7 8 This is causing intermittent crashes on some existing test cases on the buildbot 9 too; I don't have a 100% test case right now, but it should be easy to add one later 10 and this does fix a crash in a test we already have. 11 12 * dom/CharacterData.cpp: 13 (WebCore::CharacterData::CharacterData): Initialize m_data to the empty string, 14 not the null string. The class assumes the string can never being null. 15 (WebCore::CharacterData::setData): If asked to set the data to the null string, 16 set it to the empty string instead. This matches what the (non-empty) constructor 17 has always done. 18 1 19 2008-03-15 Timothy Hatcher <timothy@apple.com> 2 20 -
trunk/WebCore/dom/CharacterData.cpp
r31075 r31080 36 36 CharacterData::CharacterData(Document *doc) 37 37 : EventTargetNode(doc) 38 , m_data(StringImpl::empty()) 38 39 { 39 40 } … … 57 58 } 58 59 59 if (equal(m_data.get(), data.impl())) 60 StringImpl* dataImpl = data.impl() ? data.impl() : StringImpl::empty(); 61 if (equal(m_data.get(), dataImpl)) 60 62 return; 61 63 62 64 int oldLength = length(); 63 65 RefPtr<StringImpl> oldStr = m_data; 64 m_data = data .impl();66 m_data = dataImpl; 65 67 66 68 if ((!renderer() || !rendererIsNeeded(renderer()->style())) && attached()) {
Note: See TracChangeset
for help on using the changeset viewer.