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

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

Issue 804303002: Implement Visitor::isGlobalMarkingVisitor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix build Created 6 years 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
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/Visitor.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 /* 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } \ 228 } \
229 virtual bool isMarked(const Type*) override { return false; } \ 229 virtual bool isMarked(const Type*) override { return false; } \
230 virtual bool ensureMarked(const Type* objectPointer) override \ 230 virtual bool ensureMarked(const Type* objectPointer) override \
231 { \ 231 { \
232 return ensureMarked(objectPointer); \ 232 return ensureMarked(objectPointer); \
233 } 233 }
234 234
235 class CountingVisitor : public Visitor { 235 class CountingVisitor : public Visitor {
236 public: 236 public:
237 CountingVisitor() 237 CountingVisitor()
238 : m_count(0) 238 : Visitor(Visitor::GenericVisitorType)
239 , m_count(0)
239 { 240 {
240 } 241 }
241 242
242 virtual void mark(const void* object, TraceCallback) override 243 virtual void mark(const void* object, TraceCallback) override
243 { 244 {
244 if (object) 245 if (object)
245 m_count++; 246 m_count++;
246 } 247 }
247 248
248 virtual void mark(HeapObjectHeader* header, TraceCallback callback) override 249 virtual void mark(HeapObjectHeader* header, TraceCallback callback) override
(...skipping 5091 matching lines...) Expand 10 before | Expand all | Expand 10 after
5340 Heap::collectGarbage(ThreadState::NoHeapPointersOnStack); 5341 Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
5341 5342
5342 // Verify that the DeepEagerly chain isn't completely unravelled 5343 // Verify that the DeepEagerly chain isn't completely unravelled
5343 // by performing eager trace() calls, but the explicit mark 5344 // by performing eager trace() calls, but the explicit mark
5344 // stack is switched once some nesting limit is exceeded. 5345 // stack is switched once some nesting limit is exceeded.
5345 EXPECT_GT(DeepEagerly::sTraceLazy, 2); 5346 EXPECT_GT(DeepEagerly::sTraceLazy, 2);
5346 #endif 5347 #endif
5347 } 5348 }
5348 5349
5349 } // namespace blink 5350 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698