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

Unified Diff: src/list.h

Issue 23824005: revert thread isolate in PreallocatedStorageAllocationPolicy (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/list.h
diff --git a/src/list.h b/src/list.h
index d64256887b1d2822e9e571cc31ded21f87fa7d47..0e4e35bb41b78b3ff5aa8b106ea284d1e4ded91c 100644
--- a/src/list.h
+++ b/src/list.h
@@ -48,15 +48,13 @@ namespace internal {
// template <typename T,
// class AllocationPolicy = FreeStoreAllocationPolicy> class List;
template <typename T, class AllocationPolicy>
-class List : private AllocationPolicy::Deleter {
+class List {
public:
- explicit List(AllocationPolicy allocator = AllocationPolicy())
- : AllocationPolicy::Deleter(allocator) {
+ explicit List(AllocationPolicy allocator = AllocationPolicy()) {
Initialize(0, allocator);
}
INLINE(explicit List(int capacity,
- AllocationPolicy allocator = AllocationPolicy()))
- : AllocationPolicy::Deleter(allocator) {
+ AllocationPolicy allocator = AllocationPolicy())) {
Initialize(capacity, allocator);
}
INLINE(~List()) { DeleteData(data_); }
@@ -73,7 +71,7 @@ class List : private AllocationPolicy::Deleter {
return allocator.New(static_cast<int>(size));
}
INLINE(void operator delete(void* p)) {
- AllocationPolicy::Deleter::Delete(p);
+ AllocationPolicy::Delete(p);
}
// Please the MSVC compiler. We should never have to execute this.
@@ -81,13 +79,6 @@ class List : private AllocationPolicy::Deleter {
UNREACHABLE();
}
- // Delete via the instance Deleter
- static void Delete(List* p) {
- if (p == NULL) return;
- p->~List();
- p->AllocationPolicy::Deleter::Delete(p);
- }
-
// Returns a reference to the element at index i. This reference is
// not safe to use after operations that can change the list's
// backing store (e.g. Add).
@@ -188,7 +179,7 @@ class List : private AllocationPolicy::Deleter {
return static_cast<T*>(allocator.New(n * sizeof(T)));
}
INLINE(void DeleteData(T* data)) {
- this->AllocationPolicy::Deleter::Delete(data);
+ AllocationPolicy::Delete(data);
}
// Increase the capacity of a full list, and add an element.
« no previous file with comments | « src/isolate.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698