Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: Source/core/dom/DOMNodeIds.cpp

Issue 1085033003: Introduce InspectorIdentifiers<> and use it to assign/lookup LocalFrame and DocumentLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: win build error fixed Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/DOMNodeIds.h ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #include "config.h" 5 #include "config.h"
6 #include "core/dom/DOMNodeIds.h" 6 #include "core/dom/DOMNodeIds.h"
7 #include "core/dom/Node.h"
8 #include "platform/heap/Handle.h" 7 #include "platform/heap/Handle.h"
9 8
10 namespace blink { 9 namespace blink {
11 10
11 template class WeakIdentifierMap<Node>;
12
12 #if !ENABLE(OILPAN) 13 #if !ENABLE(OILPAN)
13 void WeakIdentifierMapTraits<Node>::removedFromIdentifierMap(Node* node) 14 void WeakIdentifierMapTraits<Node>::removedFromIdentifierMap(Node* node)
14 { 15 {
15 node->clearFlag(Node::HasWeakReferencesFlag); 16 node->clearFlag(Node::HasWeakReferencesFlag);
16 } 17 }
17 18
18 void WeakIdentifierMapTraits<Node>::addedToIdentifierMap(Node* node) 19 void WeakIdentifierMapTraits<Node>::addedToIdentifierMap(Node* node)
19 { 20 {
20 node->setFlag(Node::HasWeakReferencesFlag); 21 node->setFlag(Node::HasWeakReferencesFlag);
21 } 22 }
22 #endif 23 #endif
23 24
24 static WeakNodeMap& nodeIds() 25 static WeakNodeMap& nodeIds()
25 { 26 {
26 DEFINE_STATIC_LOCAL(RawPtrWillBePersistent<WeakNodeMap>, self, (new WeakNode Map())); 27 DEFINE_STATIC_LOCAL(WeakNodeMap::ReferenceType, self, (new WeakNodeMap()));
27 return *self; 28 return *self;
28 } 29 }
29 30
30 int DOMNodeIds::idForNode(Node* node) 31 int DOMNodeIds::idForNode(Node* node)
31 { 32 {
32 return nodeIds().identifier(node); 33 return nodeIds().identifier(node);
33 } 34 }
34 35
35 Node* DOMNodeIds::nodeForId(int id) 36 Node* DOMNodeIds::nodeForId(int id)
36 { 37 {
37 return nodeIds().lookup(id); 38 return nodeIds().lookup(id);
38 } 39 }
39 40
40 } 41 }
OLDNEW
« no previous file with comments | « Source/core/dom/DOMNodeIds.h ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698