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

Side by Side Diff: Source/heap/Visitor.h

Issue 216723002: Make sure all destructors are called in HeapHashMap and HeapHashSet (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: CR feedback Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/heap/HeapTest.cpp ('k') | Source/wtf/DefaultAllocator.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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 { 473 {
474 if (deque.isEmpty()) 474 if (deque.isEmpty())
475 return; 475 return;
476 for (typename Deque::const_iterator it = deque.begin(), end = deque.end( ); it != end; ++it) 476 for (typename Deque::const_iterator it = deque.begin(), end = deque.end( ); it != end; ++it)
477 TraceTrait<T>::trace(visitor, const_cast<T*>(&(*it))); 477 TraceTrait<T>::trace(visitor, const_cast<T*>(&(*it)));
478 } 478 }
479 }; 479 };
480 480
481 template<typename T, typename Traits = WTF::VectorTraits<T> > 481 template<typename T, typename Traits = WTF::VectorTraits<T> >
482 class HeapVectorBacking; 482 class HeapVectorBacking;
483 template<typename Key, typename Value, typename Extractor, typename Traits, type name KeyTraits> 483
484 class HeapHashTableBacking; 484 template<typename Table>
485 class HeapHashTableBacking {
486 public:
487 static void finalize(void* pointer);
488 };
485 489
486 template<typename T> 490 template<typename T>
487 class DefaultTraceTrait<T, false> { 491 class DefaultTraceTrait<T, false> {
488 public: 492 public:
489 static void mark(Visitor* visitor, const T* t) 493 static void mark(Visitor* visitor, const T* t)
490 { 494 {
491 // Default mark method of the trait just calls the two-argument mark 495 // Default mark method of the trait just calls the two-argument mark
492 // method on the visitor. The second argument is the static trace method 496 // method on the visitor. The second argument is the static trace method
493 // of the trait, which by default calls the instance method 497 // of the trait, which by default calls the instance method
494 // trace(Visitor*) on the object. 498 // trace(Visitor*) on the object.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 struct GCInfoTrait { 625 struct GCInfoTrait {
622 static const GCInfo* get() 626 static const GCInfo* get()
623 { 627 {
624 return GCInfoAtBase<typename GetGarbageCollectedBase<T>::type>::get(); 628 return GCInfoAtBase<typename GetGarbageCollectedBase<T>::type>::get();
625 } 629 }
626 }; 630 };
627 631
628 } 632 }
629 633
630 #endif 634 #endif
OLDNEW
« no previous file with comments | « Source/heap/HeapTest.cpp ('k') | Source/wtf/DefaultAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698