| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 V8GlobalValueMap_h | 5 #ifndef V8GlobalValueMap_h |
| 6 #define V8GlobalValueMap_h | 6 #define V8GlobalValueMap_h |
| 7 | 7 |
| 8 #include <v8-util.h> |
| 9 #include <v8.h> |
| 8 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| 9 #include "wtf/HashMap.h" | 11 #include "wtf/HashMap.h" |
| 10 #include "wtf/text/StringHash.h" | 12 #include "wtf/text/StringHash.h" |
| 11 #include <v8-util.h> | |
| 12 #include <v8.h> | |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * A Traits class for v8::GlobalValueMap that uses wtf/HashMap as a | 17 * A Traits class for v8::GlobalValueMap that uses wtf/HashMap as a |
| 18 * backing store. | 18 * backing store. |
| 19 * | 19 * |
| 20 * The parameter is_weak will determine whether the references are 'weak'. | 20 * The parameter is_weak will determine whether the references are 'weak'. |
| 21 * If so, entries will be removed from the map as the weak references are | 21 * If so, entries will be removed from the map as the weak references are |
| 22 * collected. | 22 * collected. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 public: | 110 public: |
| 111 typedef V8GlobalValueMapTraits<KeyType, ValueType, type> Traits; | 111 typedef V8GlobalValueMapTraits<KeyType, ValueType, type> Traits; |
| 112 explicit V8GlobalValueMap(v8::Isolate* isolate) | 112 explicit V8GlobalValueMap(v8::Isolate* isolate) |
| 113 : v8::GlobalValueMap<KeyType, ValueType, Traits>(isolate) {} | 113 : v8::GlobalValueMap<KeyType, ValueType, Traits>(isolate) {} |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace blink | 116 } // namespace blink |
| 117 | 117 |
| 118 #endif // V8GlobalValueMap_h | 118 #endif // V8GlobalValueMap_h |
| OLD | NEW |