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

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

Issue 2304023003: StackFrameDepth should be managed per ThreadHeap (Closed)
Patch Set: revert to PS1 Created 4 years, 3 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 bool isMarked(const Type*) override { return false; } \ 286 bool isMarked(const Type*) override { return false; } \
287 bool ensureMarked(const Type* objectPointer) override \ 287 bool ensureMarked(const Type* objectPointer) override \
288 { \ 288 { \
289 return ensureMarked(objectPointer); \ 289 return ensureMarked(objectPointer); \
290 } 290 }
291 291
292 class CountingVisitor : public Visitor { 292 class CountingVisitor : public Visitor {
293 public: 293 public:
294 explicit CountingVisitor(ThreadState* state) 294 explicit CountingVisitor(ThreadState* state)
295 : Visitor(state, Visitor::ThreadLocalMarking) 295 : Visitor(state, Visitor::ThreadLocalMarking)
296 , m_scope(&state->heap().stackFrameDepth())
296 , m_count(0) 297 , m_count(0)
297 { 298 {
298 } 299 }
299 300
300 void mark(const void* object, TraceCallback) override 301 void mark(const void* object, TraceCallback) override
301 { 302 {
302 if (object) 303 if (object)
303 m_count++; 304 m_count++;
304 } 305 }
305 306
(...skipping 6675 matching lines...) Expand 10 before | Expand all | Expand 10 after
6981 static_assert(WTF::IsGarbageCollectedType<HeapLinkedHashSet<Member<IntWrappe r>>>::value, "HeapLinkedHashSet"); 6982 static_assert(WTF::IsGarbageCollectedType<HeapLinkedHashSet<Member<IntWrappe r>>>::value, "HeapLinkedHashSet");
6982 static_assert(WTF::IsGarbageCollectedType<HeapListHashSet<Member<IntWrapper> >>::value, "HeapListHashSet"); 6983 static_assert(WTF::IsGarbageCollectedType<HeapListHashSet<Member<IntWrapper> >>::value, "HeapListHashSet");
6983 static_assert(WTF::IsGarbageCollectedType<HeapHashCountedSet<Member<IntWrapp er>>>::value, "HeapHashCountedSet"); 6984 static_assert(WTF::IsGarbageCollectedType<HeapHashCountedSet<Member<IntWrapp er>>>::value, "HeapHashCountedSet");
6984 static_assert(WTF::IsGarbageCollectedType<HeapHashMap<int, Member<IntWrapper >>>::value, "HeapHashMap"); 6985 static_assert(WTF::IsGarbageCollectedType<HeapHashMap<int, Member<IntWrapper >>>::value, "HeapHashMap");
6985 static_assert(WTF::IsGarbageCollectedType<HeapVector<Member<IntWrapper>>>::v alue, "HeapVector"); 6986 static_assert(WTF::IsGarbageCollectedType<HeapVector<Member<IntWrapper>>>::v alue, "HeapVector");
6986 static_assert(WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::va lue, "HeapDeque"); 6987 static_assert(WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::va lue, "HeapDeque");
6987 static_assert(WTF::IsGarbageCollectedType<HeapTerminatedArray<Member<IntWrap per>>>::value, "HeapTerminatedArray"); 6988 static_assert(WTF::IsGarbageCollectedType<HeapTerminatedArray<Member<IntWrap per>>>::value, "HeapTerminatedArray");
6988 } 6989 }
6989 6990
6990 } // namespace blink 6991 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.cpp ('k') | third_party/WebKit/Source/platform/heap/StackFrameDepth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698