| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WeakNodeMap_h | |
| 6 #define WeakNodeMap_h | |
| 7 | |
| 8 // Oilpan supports weak maps, so we no longer need WeakNodeMap. | |
| 9 #if !ENABLE(OILPAN) | |
| 10 | |
| 11 #include "core/dom/Node.h" | |
| 12 #include "core/dom/WeakIdentifierMap.h" | |
| 13 | |
| 14 namespace blink { | |
| 15 | |
| 16 template<> struct WeakIdentifierMapTraits<Node> { | |
| 17 static void removedFromIdentifierMap(Node* node) { node->clearFlag(Node::Has
WeakReferencesFlag); } | |
| 18 static void addedToIdentifierMap(Node* node) { node->setFlag(Node::HasWeakRe
ferencesFlag); } | |
| 19 }; | |
| 20 | |
| 21 typedef WeakIdentifierMap<Node> WeakNodeMap; | |
| 22 | |
| 23 } // namespace blink | |
| 24 | |
| 25 #endif // !ENABLE(OILPAN) | |
| 26 | |
| 27 #endif // WeakNodeMap_h | |
| OLD | NEW |