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

Side by Side Diff: third_party/WebKit/Source/platform/heap/TraceTraits.h

Issue 2728203002: Remove WRAPPER_VISITOR_SPECIAL_CLASSES (Closed)
Patch Set: Change CanTraceWrappers Created 3 years, 9 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef TraceTraits_h 5 #ifndef TraceTraits_h
6 #define TraceTraits_h 6 #define TraceTraits_h
7 7
8 #include "platform/heap/GCInfo.h" 8 #include "platform/heap/GCInfo.h"
9 #include "platform/heap/Heap.h" 9 #include "platform/heap/Heap.h"
10 #include "platform/heap/StackFrameDepth.h" 10 #include "platform/heap/StackFrameDepth.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 } 234 }
235 235
236 template <typename T> 236 template <typename T>
237 void TraceTrait<T>::traceMarkedWrapper(const WrapperVisitor* visitor, 237 void TraceTrait<T>::traceMarkedWrapper(const WrapperVisitor* visitor,
238 const void* t) { 238 const void* t) {
239 const T* traceable = ToWrapperTracingType(t); 239 const T* traceable = ToWrapperTracingType(t);
240 DCHECK(heapObjectHeader(t)->isWrapperHeaderMarked()); 240 DCHECK(heapObjectHeader(t)->isWrapperHeaderMarked());
241 // The term *mark* is misleading here as we effectively trace through the 241 // The term *mark* is misleading here as we effectively trace through the
242 // API boundary, i.e., tell V8 that an object is alive. Actual marking 242 // API boundary, i.e., tell V8 that an object is alive. Actual marking
243 // will be done in V8. 243 // will be done in V8.
244 visitor->markWrappersInAllWorlds(traceable); 244 traceable->markAndDispatchTraceWrappers(visitor);
245 visitor->dispatchTraceWrappers(traceable);
246 } 245 }
247 246
248 template <typename T> 247 template <typename T>
249 HeapObjectHeader* TraceTrait<T>::heapObjectHeader(const void* t) { 248 HeapObjectHeader* TraceTrait<T>::heapObjectHeader(const void* t) {
250 return HeapObjectHeader::fromPayload(ToWrapperTracingType(t)); 249 return HeapObjectHeader::fromPayload(ToWrapperTracingType(t));
251 } 250 }
252 251
253 template <typename T, typename Traits> 252 template <typename T, typename Traits>
254 struct TraceTrait<HeapVectorBacking<T, Traits>> { 253 struct TraceTrait<HeapVectorBacking<T, Traits>> {
255 STATIC_ONLY(TraceTrait); 254 STATIC_ONLY(TraceTrait);
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 // since iterating over the hash table backing will find the whole 783 // since iterating over the hash table backing will find the whole
785 // chain. 784 // chain.
786 visitor->markNoTracing(node); 785 visitor->markNoTracing(node);
787 return false; 786 return false;
788 } 787 }
789 }; 788 };
790 789
791 } // namespace WTF 790 } // namespace WTF
792 791
793 #endif 792 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/GarbageCollected.h ('k') | third_party/WebKit/Source/platform/heap/WrapperVisitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698