| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DeathAwareScriptWrappable_h | 5 #ifndef DeathAwareScriptWrappable_h |
| 6 #define DeathAwareScriptWrappable_h | 6 #define DeathAwareScriptWrappable_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "bindings/core/v8/TraceWrapperMember.h" | 9 #include "bindings/core/v8/TraceWrapperMember.h" |
| 10 #include "platform/heap/Heap.h" | 10 #include "platform/heap/Heap.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void setWrappedDependency(DeathAwareScriptWrappable* dependency) { | 64 void setWrappedDependency(DeathAwareScriptWrappable* dependency) { |
| 65 m_wrappedDependency = dependency; | 65 m_wrappedDependency = dependency; |
| 66 } | 66 } |
| 67 | 67 |
| 68 void addWrappedVectorDependency(DeathAwareScriptWrappable* dependency) { | 68 void addWrappedVectorDependency(DeathAwareScriptWrappable* dependency) { |
| 69 m_wrappedVectorDependency.push_back(Wrapper(this, dependency)); | 69 m_wrappedVectorDependency.push_back(Wrapper(this, dependency)); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void addWrappedHashMapDependency(DeathAwareScriptWrappable* key, | 72 void addWrappedHashMapDependency(DeathAwareScriptWrappable* key, |
| 73 DeathAwareScriptWrappable* value) { | 73 DeathAwareScriptWrappable* value) { |
| 74 m_wrappedHashMapDependency.add(Wrapper(this, key), Wrapper(this, value)); | 74 m_wrappedHashMapDependency.insert(Wrapper(this, key), Wrapper(this, value)); |
| 75 } | 75 } |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 typedef TraceWrapperMember<DeathAwareScriptWrappable> Wrapper; | 78 typedef TraceWrapperMember<DeathAwareScriptWrappable> Wrapper; |
| 79 DeathAwareScriptWrappable() : m_wrappedDependency(this, nullptr) {} | 79 DeathAwareScriptWrappable() : m_wrappedDependency(this, nullptr) {} |
| 80 | 80 |
| 81 Member<DeathAwareScriptWrappable> m_rawDependency; | 81 Member<DeathAwareScriptWrappable> m_rawDependency; |
| 82 Wrapper m_wrappedDependency; | 82 Wrapper m_wrappedDependency; |
| 83 HeapVector<Wrapper> m_wrappedVectorDependency; | 83 HeapVector<Wrapper> m_wrappedVectorDependency; |
| 84 HeapHashMap<Wrapper, Wrapper> m_wrappedHashMapDependency; | 84 HeapHashMap<Wrapper, Wrapper> m_wrappedHashMapDependency; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace blink | 87 } // namespace blink |
| 88 | 88 |
| 89 #endif // DeathAwareScriptWrappable_h | 89 #endif // DeathAwareScriptWrappable_h |
| OLD | NEW |