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

Side by Side Diff: third_party/WebKit/Source/core/dom/ChildListMutationScope.cpp

Issue 2694283003: Annotate ScriptWrappable-embedding singletons.
Patch Set: add XPathValue singleton Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 28 matching lines...) Expand all
39 namespace blink { 39 namespace blink {
40 40
41 // The accumulator map is used to make sure that there is only one mutation 41 // The accumulator map is used to make sure that there is only one mutation
42 // accumulator for a given node even if there are multiple 42 // accumulator for a given node even if there are multiple
43 // ChildListMutationScopes on the stack. The map is always empty when there are 43 // ChildListMutationScopes on the stack. The map is always empty when there are
44 // no ChildListMutationScopes on the stack. 44 // no ChildListMutationScopes on the stack.
45 typedef HeapHashMap<Member<Node>, Member<ChildListMutationAccumulator>> 45 typedef HeapHashMap<Member<Node>, Member<ChildListMutationAccumulator>>
46 AccumulatorMap; 46 AccumulatorMap;
47 47
48 static AccumulatorMap& accumulatorMap() { 48 static AccumulatorMap& accumulatorMap() {
49 ALLOW_UNSAFE_SINGLETON()
49 DEFINE_STATIC_LOCAL(AccumulatorMap, map, (new AccumulatorMap)); 50 DEFINE_STATIC_LOCAL(AccumulatorMap, map, (new AccumulatorMap));
50 return map; 51 return map;
51 } 52 }
52 53
53 ChildListMutationAccumulator::ChildListMutationAccumulator( 54 ChildListMutationAccumulator::ChildListMutationAccumulator(
54 Node* target, 55 Node* target,
55 MutationObserverInterestGroup* observers) 56 MutationObserverInterestGroup* observers)
56 : m_target(target), 57 : m_target(target),
57 m_lastAdded(nullptr), 58 m_lastAdded(nullptr),
58 m_observers(observers), 59 m_observers(observers),
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 visitor->trace(m_target); 154 visitor->trace(m_target);
154 visitor->trace(m_removedNodes); 155 visitor->trace(m_removedNodes);
155 visitor->trace(m_addedNodes); 156 visitor->trace(m_addedNodes);
156 visitor->trace(m_previousSibling); 157 visitor->trace(m_previousSibling);
157 visitor->trace(m_nextSibling); 158 visitor->trace(m_nextSibling);
158 visitor->trace(m_lastAdded); 159 visitor->trace(m_lastAdded);
159 visitor->trace(m_observers); 160 visitor->trace(m_observers);
160 } 161 }
161 162
162 } // namespace blink 163 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698