Commit f1224620 authored by ap@apple.com's avatar ap@apple.com

Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent bug fixes,

        because they make SVG tests crash in release builds.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent dba1a5b6
2010-01-27 Alexey Proskuryakov <ap@apple.com>
Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent bug fixes,
because they make SVG tests crash in release builds.
* wtf/HashMap.h:
(WTF::::remove):
* wtf/HashSet.h:
(WTF::::remove):
* wtf/HashTable.h:
(WTF::::add):
(WTF::::addPassingHashCode):
(WTF::::removeAndInvalidate):
(WTF::::remove):
(WTF::::rehash):
(WTF::::checkTableConsistency):
(WTF::::checkTableConsistencyExceptSize):
* wtf/HashTraits.h:
(WTF::GenericHashTraits::emptyValue):
(WTF::):
* wtf/RefPtrHashMap.h:
(WTF::::remove):
2010-01-26 Alexey Proskuryakov <ap@apple.com>
More Windows build fixing.
......
......@@ -100,8 +100,6 @@ namespace WTF {
// static translate(ValueType&, const T&, unsigned hashCode);
template<typename T, typename HashTranslator> pair<iterator, bool> add(const T&, const MappedType&);
void checkConsistency() const;
private:
pair<iterator, bool> inlineAdd(const KeyType&, const MappedType&);
......@@ -283,7 +281,7 @@ namespace WTF {
{
if (it.m_impl == m_impl.end())
return;
m_impl.internalCheckTableConsistency();
m_impl.checkTableConsistency();
m_impl.removeWithoutEntryConsistencyCheck(it.m_impl);
}
......@@ -312,13 +310,6 @@ namespace WTF {
return result;
}
template<typename T, typename U, typename V, typename W, typename X>
inline void HashMap<T, U, V, W, X>::checkConsistency() const
{
m_impl.checkTableConsistency();
}
template<typename T, typename U, typename V, typename W, typename X>
bool operator==(const HashMap<T, U, V, W, X>& a, const HashMap<T, U, V, W, X>& b)
{
......
......@@ -224,7 +224,7 @@ namespace WTF {
{
if (it.m_impl == m_impl.end())
return;
m_impl.internalCheckTableConsistency();
m_impl.checkTableConsistency();
m_impl.removeWithoutEntryConsistencyCheck(it.m_impl);
}
......
......@@ -30,7 +30,6 @@
namespace WTF {
#define DUMP_HASHTABLE_STATS 0
// Enables internal WTF consistency checks that are invoked automatically. Non-WTF callers can call checkTableConsistency() even if internal checks are disabled.
#define CHECK_HASHTABLE_CONSISTENCY 0
#ifdef NDEBUG
......@@ -341,18 +340,11 @@ namespace WTF {
ValueType* lookup(const Key& key) { return lookup<Key, IdentityTranslatorType>(key); }
template<typename T, typename HashTranslator> ValueType* lookup(const T&);
#if !ASSERT_DISABLED
#if CHECK_HASHTABLE_CONSISTENCY
void checkTableConsistency() const;
#else
static void checkTableConsistency() { }
#endif
#if CHECK_HASHTABLE_CONSISTENCY
void internalCheckTableConsistency() const { checkTableConsistency(); }
void internalCheckTableConsistencyExceptSize() const { checkTableConsistencyExceptSize(); }
#else
static void internalCheckTableConsistencyExceptSize() { }
static void internalCheckTableConsistency() { }
#endif
private:
static ValueType* allocateTable(int size);
......@@ -391,7 +383,7 @@ namespace WTF {
iterator makeKnownGoodIterator(ValueType* pos) { return iterator(this, pos, m_table + m_tableSize, HashItemKnownGood); }
const_iterator makeKnownGoodConstIterator(ValueType* pos) const { return const_iterator(this, pos, m_table + m_tableSize, HashItemKnownGood); }
#if !ASSERT_DISABLED
#if CHECK_HASHTABLE_CONSISTENCY
void checkTableConsistencyExceptSize() const;
#else
static void checkTableConsistencyExceptSize() { }
......@@ -632,7 +624,7 @@ namespace WTF {
if (!m_table)
expand();
internalCheckTableConsistency();
checkTableConsistency();
ASSERT(m_table);
......@@ -701,7 +693,7 @@ namespace WTF {
return p;
}
internalCheckTableConsistency();
checkTableConsistency();
return std::make_pair(makeKnownGoodIterator(entry), true);
}
......@@ -717,7 +709,7 @@ namespace WTF {
if (!m_table)
expand();
internalCheckTableConsistency();
checkTableConsistency();
FullLookupType lookupResult = fullLookupForWriting<T, HashTranslator>(key);
......@@ -746,7 +738,7 @@ namespace WTF {
return p;
}
internalCheckTableConsistency();
checkTableConsistency();
return std::make_pair(makeKnownGoodIterator(entry), true);
}
......@@ -813,7 +805,7 @@ namespace WTF {
void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::removeAndInvalidate(ValueType* pos)
{
invalidateIterators();
internalCheckTableConsistency();
checkTableConsistency();
remove(pos);
}
......@@ -831,7 +823,7 @@ namespace WTF {
if (shouldShrink())
shrink();
internalCheckTableConsistency();
checkTableConsistency();
}
template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
......@@ -900,7 +892,7 @@ namespace WTF {
template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::rehash(int newTableSize)
{
internalCheckTableConsistencyExceptSize();
checkTableConsistencyExceptSize();
int oldTableSize = m_tableSize;
ValueType* oldTable = m_table;
......@@ -922,7 +914,7 @@ namespace WTF {
deallocateTable(oldTable, oldTableSize);
internalCheckTableConsistency();
checkTableConsistency();
}
template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
......@@ -989,13 +981,13 @@ namespace WTF {
return *this;
}
#if !ASSERT_DISABLED
#if CHECK_HASHTABLE_CONSISTENCY
template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::checkTableConsistency() const
{
checkTableConsistencyExceptSize();
ASSERT(!m_table || !shouldExpand());
ASSERT(!shouldExpand());
ASSERT(!shouldShrink());
}
......@@ -1020,8 +1012,6 @@ namespace WTF {
const_iterator it = find(Extractor::extract(*entry));
ASSERT(entry == it.m_position);
++count;
KeyTraits::checkValueConsistency(it->first);
}
ASSERT(count == m_keyCount);
......@@ -1031,7 +1021,7 @@ namespace WTF {
ASSERT(m_tableSize == m_tableSizeMask + 1);
}
#endif // ASSERT_DISABLED
#endif // CHECK_HASHTABLE_CONSISTENCY
#if CHECK_HASHTABLE_ITERATORS
......
......@@ -26,13 +26,6 @@
#include <utility>
#include <limits>
// For malloc_size and _msize.
#if OS(DARWIN)
#include <malloc/malloc.h>
#elif COMPILER(MSVC)
#include <malloc.h>
#endif
namespace WTF {
using std::pair;
......@@ -58,7 +51,6 @@ namespace WTF {
template<typename T> struct GenericHashTraits : GenericHashTraitsBase<IsInteger<T>::value, T> {
typedef T TraitType;
static T emptyValue() { return T(); }
static void checkValueConsistency(const T&) { }
};
template<typename T> struct HashTraits : GenericHashTraits<T> { };
......@@ -87,19 +79,6 @@ namespace WTF {
static const bool needsDestruction = false;
static void constructDeletedValue(P*& slot) { slot = reinterpret_cast<P*>(-1); }
static bool isDeletedValue(P* value) { return value == reinterpret_cast<P*>(-1); }
#if !ASSERT_DISABLED
static void checkValueConsistency(const P* p)
{
#if (defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) || !defined(NDEBUG)
#if OS(DARWIN)
ASSERT(malloc_size(p));
#elif COMPILER(MSVC)
ASSERT(_msize(const_cast<P*>(p)));
#endif
#endif
HashTraits<P>::checkValueConsistency(*p);
}
#endif
};
template<typename P> struct HashTraits<RefPtr<P> > : GenericHashTraits<RefPtr<P> > {
......
......@@ -285,7 +285,7 @@ namespace WTF {
{
if (it.m_impl == m_impl.end())
return;
m_impl.internalCheckTableConsistency();
m_impl.checkTableConsistency();
m_impl.removeWithoutEntryConsistencyCheck(it.m_impl);
}
......
2010-01-27 Alexey Proskuryakov <ap@apple.com>
Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent bug fixes,
because they make SVG tests crash in release builds.
* css/CSSStyleSelector.cpp:
(WebCore::CSSRuleSet::getIDRules):
(WebCore::CSSRuleSet::getClassRules):
(WebCore::CSSRuleSet::getTagRules):
(WebCore::CSSStyleSelector::keyframeStylesForAnimation):
* dom/CheckedRadioButtons.cpp:
(WebCore::CheckedRadioButtons::checkedButtonForGroup):
(WebCore::CheckedRadioButtons::removeButton):
* dom/ContainerNodeAlgorithms.h:
(WebCore::removeAllChildrenInContainer):
* dom/Document.cpp:
(WebCore::Document::getElementById):
(WebCore::Document::removeElementById):
(WebCore::Document::removeImageMap):
(WebCore::Document::getImageMap):
(WebCore::Document::nameCollectionInfo):
* dom/Document.h:
(WebCore::Document::collectionInfo):
* editing/markup.cpp:
(WebCore::shouldAddNamespaceAttr):
(WebCore::appendNamespace):
(WebCore::appendStartMarkup):
* html/CollectionCache.cpp:
* html/CollectionCache.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::namedItems):
(WebCore::HTMLCollection::nextNamedItem):
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::formCollectionInfo):
* html/HTMLSelectElement.h:
(WebCore::HTMLSelectElement::collectionInfo):
* loader/loader.cpp:
(WebCore::Loader::load):
(WebCore::Loader::servePendingRequests):
(WebCore::Loader::nonCacheRequestInFlight):
(WebCore::Loader::nonCacheRequestComplete):
(WebCore::Loader::cancelRequests):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::clearRenderer):
(WebCore::CompositeAnimation::updateKeyframeAnimations):
(WebCore::CompositeAnimation::animate):
(WebCore::CompositeAnimation::getAnimatedStyle):
(WebCore::CompositeAnimation::setAnimating):
(WebCore::CompositeAnimation::timeToNextService):
(WebCore::CompositeAnimation::getAnimationForProperty):
(WebCore::CompositeAnimation::suspendAnimations):
(WebCore::CompositeAnimation::resumeAnimations):
(WebCore::CompositeAnimation::isAnimatingProperty):
(WebCore::CompositeAnimation::pauseAnimationAtTime):
(WebCore::CompositeAnimation::numberOfActiveAnimations):
* platform/TreeShared.h:
(WebCore::TreeShared::~TreeShared):
(WebCore::TreeShared::deref):
2010-01-25 Philippe Normand <pnormand@igalia.com>
Reviewed by Eric Seidel.
......@@ -361,9 +361,9 @@ public:
void addToRuleSet(AtomicStringImpl* key, AtomRuleMap& map,
CSSStyleRule* rule, CSSSelector* sel);
CSSRuleDataList* getIDRules(AtomicStringImpl* key) { m_idRules.checkConsistency(); return m_idRules.get(key); }
CSSRuleDataList* getClassRules(AtomicStringImpl* key) { m_classRules.checkConsistency(); return m_classRules.get(key); }
CSSRuleDataList* getTagRules(AtomicStringImpl* key) { m_tagRules.checkConsistency(); return m_tagRules.get(key); }
CSSRuleDataList* getIDRules(AtomicStringImpl* key) { return m_idRules.get(key); }
CSSRuleDataList* getClassRules(AtomicStringImpl* key) { return m_classRules.get(key); }
CSSRuleDataList* getTagRules(AtomicStringImpl* key) { return m_tagRules.get(key); }
CSSRuleDataList* getUniversalRules() { return m_universalRules; }
public:
......@@ -1301,9 +1301,7 @@ void CSSStyleSelector::keyframeStylesForAnimation(Element* e, const RenderStyle*
// Get the keyframesRule for this name
if (!e || list.animationName().isEmpty())
return;
m_keyframesRuleMap.checkConsistency();
if (!m_keyframesRuleMap.contains(list.animationName().impl()))
return;
......
......@@ -60,8 +60,6 @@ HTMLInputElement* CheckedRadioButtons::checkedButtonForGroup(const AtomicString&
{
if (!m_nameToCheckedRadioButtonMap)
return 0;
m_nameToCheckedRadioButtonMap->checkConsistency();
return m_nameToCheckedRadioButtonMap->get(name.impl());
}
......@@ -71,8 +69,6 @@ void CheckedRadioButtons::removeButton(HTMLFormControlElement* element)
if (element->name().isEmpty() || !m_nameToCheckedRadioButtonMap)
return;
m_nameToCheckedRadioButtonMap->checkConsistency();
NameToInputMap::iterator it = m_nameToCheckedRadioButtonMap->find(element->name().impl());
if (it == m_nameToCheckedRadioButtonMap->end() || it->second != element)
return;
......
......@@ -33,12 +33,6 @@ namespace Private {
template<class GenericNode, class GenericNodeContainer>
void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer* container);
template<class GenericNode, bool dispatchRemovalNotification>
struct NodeRemovalDispatcher;
template<class GenericNode>
struct ShouldDispatchRemovalNotification;
};
// Helper functions for TreeShared-derived classes, which have a 'Node' style interface
......@@ -67,7 +61,6 @@ void removeAllChildrenInContainer(GenericNodeContainer* container)
if (n->hasChildNodes())
Private::addChildNodesToDeletionQueue<GenericNode, GenericNodeContainer>(head, tail, static_cast<GenericNodeContainer*>(n));
Private::NodeRemovalDispatcher<GenericNode, Private::ShouldDispatchRemovalNotification<GenericNode>::value>::dispatch(n);
delete n;
}
}
......
......@@ -884,8 +884,6 @@ Element* Document::getElementById(const AtomicString& elementId) const
if (elementId.isEmpty())
return 0;
m_elementsById.checkConsistency();
Element* element = m_elementsById.get(elementId.impl());
if (element)
return element;
......@@ -1077,8 +1075,6 @@ void Document::addElementById(const AtomicString& elementId, Element* element)
void Document::removeElementById(const AtomicString& elementId, Element* element)
{
m_elementsById.checkConsistency();
if (m_elementsById.get(elementId.impl()) == element)
m_elementsById.remove(elementId.impl());
else
......@@ -3361,8 +3357,6 @@ void Document::removeImageMap(HTMLMapElement* imageMap)
if (!name.impl())
return;
m_imageMapsByName.checkConsistency();
ImageMapsByName::iterator it = m_imageMapsByName.find(name.impl());
if (it != m_imageMapsByName.end() && it->second == imageMap)
m_imageMapsByName.remove(it);
......@@ -3375,7 +3369,6 @@ HTMLMapElement *Document::getImageMap(const String& url) const
int hashPos = url.find('#');
String name = (hashPos < 0 ? url : url.substring(hashPos + 1)).impl();
AtomicString mapName = isHTMLDocument() ? name.lower() : name;
m_imageMapsByName.checkConsistency();
return m_imageMapsByName.get(mapName.impl());
}
......@@ -4181,7 +4174,6 @@ CollectionCache* Document::nameCollectionInfo(CollectionType type, const AtomicS
NamedCollectionMap::iterator iter = map.find(name.impl());
if (iter == map.end())
iter = map.add(name.impl(), new CollectionCache).first;
iter->second->checkConsistency();
return iter->second;
}
......
......@@ -349,7 +349,6 @@ public:
ASSERT(type >= FirstUnnamedDocumentCachedType);
unsigned index = type - FirstUnnamedDocumentCachedType;
ASSERT(index < NumUnnamedDocumentCachedTypes);
m_collectionInfo[index].checkConsistency();
return &m_collectionInfo[index];
}
......
......@@ -315,8 +315,6 @@ static bool shouldAddNamespaceElem(const Element* elem)
static bool shouldAddNamespaceAttr(const Attribute* attr, HashMap<AtomicStringImpl*, AtomicStringImpl*>& namespaces)
{
namespaces.checkConsistency();
// Don't add namespace attributes twice
if (attr->name() == XMLNSNames::xmlnsAttr) {
namespaces.set(emptyAtom.impl(), attr->value().impl());
......@@ -334,7 +332,6 @@ static bool shouldAddNamespaceAttr(const Attribute* attr, HashMap<AtomicStringIm
static void appendNamespace(Vector<UChar>& result, const AtomicString& prefix, const AtomicString& ns, HashMap<AtomicStringImpl*, AtomicStringImpl*>& namespaces)
{
namespaces.checkConsistency();
if (ns.isEmpty())
return;
......@@ -395,9 +392,6 @@ enum RangeFullySelectsNode { DoesFullySelectNode, DoesNotFullySelectNode };
static void appendStartMarkup(Vector<UChar>& result, const Node* node, const Range* range, EAnnotateForInterchange annotate, bool convertBlocksToInlines = false, HashMap<AtomicStringImpl*, AtomicStringImpl*>* namespaces = 0, RangeFullySelectsNode rangeFullySelectsNode = DoesFullySelectNode)
{
if (namespaces)
namespaces->checkConsistency();
bool documentIsHTML = node->document()->isHTMLDocument();
switch (node->nodeType()) {
case Node::TEXT_NODE: {
......
......@@ -85,12 +85,4 @@ void CollectionCache::reset()
hasNameCache = false;
}
#if !ASSERT_DISABLED
void CollectionCache::checkConsistency()
{
idCache.checkConsistency();
nameCache.checkConsistency();
}
#endif
} // namespace WebCore
......@@ -43,8 +43,6 @@ struct CollectionCache : FastAllocBase {
void reset();
void swap(CollectionCache&);
void checkConsistency();
typedef HashMap<AtomicStringImpl*, Vector<Element*>*> NodeCacheMap;
unsigned version;
......@@ -61,10 +59,6 @@ private:
static void copyCacheMap(NodeCacheMap&, const NodeCacheMap&);
};
#if ASSERT_DISABLED
inline void CollectionCache::checkConsistency() { }
#endif
} // namespace
#endif
......@@ -358,8 +358,7 @@ void HTMLCollection::namedItems(const AtomicString& name, Vector<RefPtr<Node> >&
resetCollectionInfo();
updateNameCache();
m_info->checkConsistency();
Vector<Element*>* idResults = m_info->idCache.get(name.impl());
Vector<Element*>* nameResults = m_info->nameCache.get(name.impl());
......@@ -374,7 +373,6 @@ void HTMLCollection::namedItems(const AtomicString& name, Vector<RefPtr<Node> >&
Node* HTMLCollection::nextNamedItem(const AtomicString& name) const
{
resetCollectionInfo();
m_info->checkConsistency();
for (Element* e = itemAfter(m_info->current); e; e = itemAfter(e)) {
if (checkForNameMatch(e, m_idsDone, name)) {
......
......@@ -40,7 +40,6 @@ inline CollectionCache* HTMLFormCollection::formCollectionInfo(HTMLFormElement*
{
if (!form->collectionInfo)
form->collectionInfo = new CollectionCache;
form->collectionInfo->checkConsistency();
return form->collectionInfo;
}
......
......@@ -76,7 +76,7 @@ public:
Node* namedItem(const AtomicString& name);
Node* item(unsigned index);
CollectionCache* collectionInfo() { m_collectionInfo.checkConsistency(); return &m_collectionInfo; }
CollectionCache* collectionInfo() { return &m_collectionInfo; }
void scrollToSelection();
......
......@@ -125,7 +125,6 @@ void Loader::load(DocLoader* docLoader, CachedResource* resource, bool increment
RefPtr<Host> host;
KURL url(ParsedURLString, resource->url());
if (url.protocolInHTTPFamily()) {
m_hosts.checkConsistency();
AtomicString hostName = url.host();
host = m_hosts.get(hostName.impl());
if (!host) {
......@@ -170,7 +169,6 @@ void Loader::servePendingRequests(Priority minimumPriority)
m_nonHTTPProtocolHost->servePendingRequests(minimumPriority);
Vector<Host*> hostsToServe;
m_hosts.checkConsistency();
HostMap::iterator i = m_hosts.begin();
HostMap::iterator end = m_hosts.end();
for (;i != end; ++i)
......@@ -207,7 +205,6 @@ void Loader::nonCacheRequestInFlight(const KURL& url)
return;
AtomicString hostName = url.host();
m_hosts.checkConsistency();
RefPtr<Host> host = m_hosts.get(hostName.impl());
if (!host) {
host = Host::create(hostName, maxRequestsInFlightPerHost);
......@@ -223,7 +220,6 @@ void Loader::nonCacheRequestComplete(const KURL& url)
return;
AtomicString hostName = url.host();
m_hosts.checkConsistency();
RefPtr<Host> host = m_hosts.get(hostName.impl());
ASSERT(host);
if (!host)
......@@ -240,7 +236,6 @@ void Loader::cancelRequests(DocLoader* docLoader)
m_nonHTTPProtocolHost->cancelRequests(docLoader);
Vector<Host*> hostsToCancel;
m_hosts.checkConsistency();
HostMap::iterator i = m_hosts.begin();
HostMap::iterator end = m_hosts.end();
for (;i != end; ++i)
......
......@@ -57,7 +57,6 @@ void CompositeAnimation::clearRenderer()
}
}
if (!m_keyframeAnimations.isEmpty()) {
m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
......@@ -187,8 +186,6 @@ void CompositeAnimation::updateKeyframeAnimations(RenderObject* renderer, Render
if (m_keyframeAnimations.isEmpty() && !targetStyle->hasAnimations())
return;
m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator kfend = m_keyframeAnimations.end();
if (currentStyle && currentStyle->hasAnimations() && targetStyle->hasAnimations() && *(currentStyle->animations()) == *(targetStyle->animations())) {
......@@ -265,7 +262,6 @@ PassRefPtr<RenderStyle> CompositeAnimation::animate(RenderObject* renderer, Rend
// We don't do any transitions if we don't have a currentStyle (on startup).
updateTransitions(renderer, currentStyle, targetStyle);
updateKeyframeAnimations(renderer, currentStyle, targetStyle);
m_keyframeAnimations.checkConsistency();
if (currentStyle) {
// Now that we have transition objects ready, let them know about the new goal state. We want them
......@@ -299,8 +295,6 @@ PassRefPtr<RenderStyle> CompositeAnimation::getAnimatedStyle() const
implicitAnimation->getAnimatedStyle(resultStyle);
}
m_keyframeAnimations.checkConsistency();
for (Vector<AtomicStringImpl*>::const_iterator it = m_keyframeAnimationOrderMap.begin(); it != m_keyframeAnimationOrderMap.end(); ++it) {
RefPtr<KeyframeAnimation> keyframeAnimation = m_keyframeAnimations.get(*it);
if (keyframeAnimation)
......@@ -321,7 +315,6 @@ void CompositeAnimation::setAnimating(bool animating)
}
}
if (!m_keyframeAnimations.isEmpty()) {
m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
......@@ -348,7 +341,6 @@ double CompositeAnimation::timeToNextService() const
}
}
if (!m_keyframeAnimations.isEmpty()) {
m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* animation = it->second.get();
......@@ -370,7 +362,6 @@ PassRefPtr<KeyframeAnimation> CompositeAnimation::getAnimationForProperty(int pr
// We want to send back the last animation with the property if there are multiples.
// So we need to iterate through all animations
if (!m_keyframeAnimations.isEmpty()) {
m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
RefPtr<KeyframeAnimation> anim = it->second;
......@@ -390,7 +381,6 @@ void CompositeAnimation::suspendAnimations()
m_isSuspended = true;
if (!m_keyframeAnimations.isEmpty()) {
m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
if (KeyframeAnimation* anim = it->second.get())
......@@ -415,7 +405,6 @@ void CompositeAnimation::resumeAnimations()
m_isSuspended = false;
if (!m_keyframeAnimations.isEmpty()) {
m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
......@@ -461,7 +450,6 @@ void CompositeAnimation::resumeOverriddenImplicitAnimations(int property)
bool CompositeAnimation::isAnimatingProperty(int property, bool isRunningNow) const
{
if (!m_keyframeAnimations.isEmpty()) {
m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
......@@ -486,8 +474,6 @@ bool CompositeAnimation::pauseAnimationAtTime(const AtomicString& name, double t
if (!name)
return false;
m_keyframeAnimations.checkConsistency();
RefPtr<KeyframeAnimation> keyframeAnim = m_keyframeAnimations.get(name.impl());
if (!keyframeAnim || !keyframeAnim->running())
return false;
......@@ -523,7 +509,6 @@ unsigned CompositeAnimation::numberOfActiveAnimations() const
unsigned count = 0;
if (!m_keyframeAnimations.isEmpty()) {
m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
......
......@@ -44,7 +44,6 @@ public:
virtual ~TreeShared()
{
ASSERT(isMainThread());
ASSERT(!m_refCount);
ASSERT(m_deletionHasBegun);
}
......@@ -59,7 +58,6 @@ public:
void deref()
{
ASSERT(isMainThread());
ASSERT(m_refCount >= 0);
ASSERT(!m_deletionHasBegun);
ASSERT(!m_inRemovedLastRefFunction);
if (--m_refCount <= 0 && !m_parent) {
......
Markdown is supported
0% or