Changeset 122163 in webkit
- Timestamp:
- Jul 9, 2012 4:07:09 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r122160 r122163 1 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> 2 3 Microdata tests are flaky 4 https://bugs.webkit.org/show_bug.cgi?id=90830 5 6 Reviewed by Antti Koivisto. 7 8 The bug was caused by SpaceSplitString's not copying on write properly. 9 Even if there was exactly one owner of the SpaceSplitString, we should still not modify 10 m_data since m_data is associated with a particular m_keyString in sharedDataMap(). 11 12 The only situation in which we can safely modify m_data is when m_data's m_keyString is null 13 meaning that it had been unique'ed. Furthermore, this optimization had not been used for 14 class lists because class list's refCount is always zero as its ref and deref are forwarded 15 to the associated Element's ref and deref. This fix re-enables the optimization for class lists. 16 17 This behavior change is tested by existing microdata API tests. Without this patch, 18 some tests such as properties-collection-add-remove-property.html fail on the first run 19 when several tests were ran in the same WebKit instance. 20 21 * dom/SpaceSplitString.h: 22 (WebCore::SpaceSplitStringData::isUnique): 23 (WebCore::SpaceSplitString::ensureUnique): 24 1 25 2012-07-09 Dana Jansens <danakj@chromium.org> 2 26 -
trunk/Source/WebCore/dom/SpaceSplitString.h
r105186 r122163 50 50 void remove(const AtomicString&); 51 51 52 bool isUnique() const { return m_keyString.isNull(); } 52 53 size_t size() const { return m_vector.size(); } 53 54 const AtomicString& operator[](size_t i) { ASSERT(i < size()); return m_vector[i]; } … … 83 84 void ensureUnique() 84 85 { 85 if (m_data && !m_data-> hasOneRef())86 if (m_data && !m_data->isUnique()) 86 87 m_data = SpaceSplitStringData::createUnique(*m_data); 87 88 }
Note: See TracChangeset
for help on using the changeset viewer.