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

Side by Side Diff: third_party/WebKit/Source/platform/heap/HeapTest.cpp

Issue 1627713002: Add more missing closing namespace comments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, address comment (also filed llvm.org/PR26290) Created 4 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // suddenly disappear during iteration. Returns true if weak pointers to 186 // suddenly disappear during iteration. Returns true if weak pointers to
187 // dead objects were found: In this case any strong pointers were not yet 187 // dead objects were found: In this case any strong pointers were not yet
188 // traced and the entry should be removed from the collection. 188 // traced and the entry should be removed from the collection.
189 template<typename VisitorDispatcher> 189 template<typename VisitorDispatcher>
190 static bool traceInCollection(VisitorDispatcher visitor, T& t, WTF::ShouldWe akPointersBeMarkedStrongly strongify) 190 static bool traceInCollection(VisitorDispatcher visitor, T& t, WTF::ShouldWe akPointersBeMarkedStrongly strongify)
191 { 191 {
192 return t.traceInCollection(visitor, strongify); 192 return t.traceInCollection(visitor, strongify);
193 } 193 }
194 }; 194 };
195 195
196 } 196 } // namespace blink
197 197
198 namespace WTF { 198 namespace WTF {
199 199
200 template<typename T> struct DefaultHash; 200 template<typename T> struct DefaultHash;
201 template<> struct DefaultHash<blink::ThreadMarker> { 201 template<> struct DefaultHash<blink::ThreadMarker> {
202 typedef blink::ThreadMarkerHash Hash; 202 typedef blink::ThreadMarkerHash Hash;
203 }; 203 };
204 204
205 // ThreadMarkerHash is the default hash for ThreadMarker 205 // ThreadMarkerHash is the default hash for ThreadMarker
206 template<> struct HashTraits<blink::ThreadMarker> : GenericHashTraits<blink::Thr eadMarker> { 206 template<> struct HashTraits<blink::ThreadMarker> : GenericHashTraits<blink::Thr eadMarker> {
(...skipping 17 matching lines...) Expand all
224 // SimpleClassHashTraits allow empty slots in the table to be initialzed with 224 // SimpleClassHashTraits allow empty slots in the table to be initialzed with
225 // memset to zero, and we use -1 in the first part of the pair to represent 225 // memset to zero, and we use -1 in the first part of the pair to represent
226 // deleted slots. 226 // deleted slots.
227 template<> struct HashTraits<blink::PairWithWeakHandling> : blink::WeakHandlingH ashTraits<blink::PairWithWeakHandling> { 227 template<> struct HashTraits<blink::PairWithWeakHandling> : blink::WeakHandlingH ashTraits<blink::PairWithWeakHandling> {
228 static const bool hasIsEmptyValueFunction = true; 228 static const bool hasIsEmptyValueFunction = true;
229 static bool isEmptyValue(const blink::PairWithWeakHandling& value) { return !value.first; } 229 static bool isEmptyValue(const blink::PairWithWeakHandling& value) { return !value.first; }
230 static void constructDeletedValue(blink::PairWithWeakHandling& slot, bool) { new (NotNull, &slot) blink::PairWithWeakHandling(HashTableDeletedValue); } 230 static void constructDeletedValue(blink::PairWithWeakHandling& slot, bool) { new (NotNull, &slot) blink::PairWithWeakHandling(HashTableDeletedValue); }
231 static bool isDeletedValue(const blink::PairWithWeakHandling& value) { retur n value.isHashTableDeletedValue(); } 231 static bool isDeletedValue(const blink::PairWithWeakHandling& value) { retur n value.isHashTableDeletedValue(); }
232 }; 232 };
233 233
234 } 234 } // namespace WTF
235 235
236 namespace blink { 236 namespace blink {
237 237
238 class TestGCScope { 238 class TestGCScope {
239 public: 239 public:
240 explicit TestGCScope(BlinkGC::StackState state) 240 explicit TestGCScope(BlinkGC::StackState state)
241 : m_state(ThreadState::current()) 241 : m_state(ThreadState::current())
242 , m_safePointScope(state) 242 , m_safePointScope(state)
243 , m_parkedAllThreads(false) 243 , m_parkedAllThreads(false)
244 { 244 {
(...skipping 6279 matching lines...) Expand 10 before | Expand all | Expand 10 after
6524 EXPECT_EQ(1u, vector2.size()); 6524 EXPECT_EQ(1u, vector2.size());
6525 // TODO(Oilpan): when Vector.h's contiguous container support no longer disables 6525 // TODO(Oilpan): when Vector.h's contiguous container support no longer disables
6526 // Vector<>s with inline capacity, remove. 6526 // Vector<>s with inline capacity, remove.
6527 #if !defined(ANNOTATE_CONTIGUOUS_CONTAINER) 6527 #if !defined(ANNOTATE_CONTIGUOUS_CONTAINER)
6528 EXPECT_EQ(16u, vector1.capacity()); 6528 EXPECT_EQ(16u, vector1.capacity());
6529 EXPECT_EQ(16u, vector2.capacity()); 6529 EXPECT_EQ(16u, vector2.capacity());
6530 #endif 6530 #endif
6531 } 6531 }
6532 6532
6533 } // namespace blink 6533 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698