| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 } | 40 } |
| 41 | 41 |
| 42 V0CustomElementUpgradeCandidateMap::~V0CustomElementUpgradeCandidateMap() {} | 42 V0CustomElementUpgradeCandidateMap::~V0CustomElementUpgradeCandidateMap() {} |
| 43 | 43 |
| 44 void V0CustomElementUpgradeCandidateMap::add( | 44 void V0CustomElementUpgradeCandidateMap::add( |
| 45 const V0CustomElementDescriptor& descriptor, | 45 const V0CustomElementDescriptor& descriptor, |
| 46 Element* element) { | 46 Element* element) { |
| 47 observe(element); | 47 observe(element); |
| 48 | 48 |
| 49 UpgradeCandidateMap::AddResult result = | 49 UpgradeCandidateMap::AddResult result = |
| 50 m_upgradeCandidates.add(element, descriptor); | 50 m_upgradeCandidates.insert(element, descriptor); |
| 51 DCHECK(result.isNewEntry); | 51 DCHECK(result.isNewEntry); |
| 52 | 52 |
| 53 UnresolvedDefinitionMap::iterator it = | 53 UnresolvedDefinitionMap::iterator it = |
| 54 m_unresolvedDefinitions.find(descriptor); | 54 m_unresolvedDefinitions.find(descriptor); |
| 55 ElementSet* elements; | 55 ElementSet* elements; |
| 56 if (it == m_unresolvedDefinitions.end()) | 56 if (it == m_unresolvedDefinitions.end()) |
| 57 elements = m_unresolvedDefinitions.add(descriptor, new ElementSet()) | 57 elements = m_unresolvedDefinitions.insert(descriptor, new ElementSet()) |
| 58 .storedValue->value.get(); | 58 .storedValue->value.get(); |
| 59 else | 59 else |
| 60 elements = it->value.get(); | 60 elements = it->value.get(); |
| 61 elements->add(element); | 61 elements->add(element); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void V0CustomElementUpgradeCandidateMap::elementWasDestroyed(Element* element) { | 64 void V0CustomElementUpgradeCandidateMap::elementWasDestroyed(Element* element) { |
| 65 V0CustomElementObserver::elementWasDestroyed(element); | 65 V0CustomElementObserver::elementWasDestroyed(element); |
| 66 UpgradeCandidateMap::iterator candidate = m_upgradeCandidates.find(element); | 66 UpgradeCandidateMap::iterator candidate = m_upgradeCandidates.find(element); |
| 67 SECURITY_DCHECK(candidate != m_upgradeCandidates.end()); | 67 SECURITY_DCHECK(candidate != m_upgradeCandidates.end()); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 88 return candidates; | 88 return candidates; |
| 89 } | 89 } |
| 90 | 90 |
| 91 DEFINE_TRACE(V0CustomElementUpgradeCandidateMap) { | 91 DEFINE_TRACE(V0CustomElementUpgradeCandidateMap) { |
| 92 visitor->trace(m_upgradeCandidates); | 92 visitor->trace(m_upgradeCandidates); |
| 93 visitor->trace(m_unresolvedDefinitions); | 93 visitor->trace(m_unresolvedDefinitions); |
| 94 V0CustomElementObserver::trace(visitor); | 94 V0CustomElementObserver::trace(visitor); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace blink | 97 } // namespace blink |
| OLD | NEW |