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

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

Issue 1425533005: Rename DefaultAllocator to PartitionAllocator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | third_party/WebKit/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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 template<typename U> 505 template<typename U>
506 CrossThreadWeakPersistent& operator=(const RawPtr<U>& other) 506 CrossThreadWeakPersistent& operator=(const RawPtr<U>& other)
507 { 507 {
508 Parent::operator=(other); 508 Parent::operator=(other);
509 return *this; 509 return *this;
510 } 510 }
511 }; 511 };
512 512
513 template<typename Collection> 513 template<typename Collection>
514 class PersistentHeapCollectionBase : public Collection { 514 class PersistentHeapCollectionBase : public Collection {
515 // We overload the various new and delete operators with using the WTF Defau ltAllocator to ensure persistent 515 // We overload the various new and delete operators with using the WTF Parti tionAllocator to ensure persistent
516 // heap collections are always allocated off-heap. This allows persistent co llections to be used in 516 // heap collections are always allocated off-heap. This allows persistent co llections to be used in
517 // DEFINE_STATIC_LOCAL et. al. 517 // DEFINE_STATIC_LOCAL et. al.
518 WTF_USE_ALLOCATOR(PersistentHeapCollectionBase, WTF::DefaultAllocator); 518 WTF_USE_ALLOCATOR(PersistentHeapCollectionBase, WTF::PartitionAllocator);
519 public: 519 public:
520 PersistentHeapCollectionBase() 520 PersistentHeapCollectionBase()
521 { 521 {
522 initialize(); 522 initialize();
523 } 523 }
524 524
525 PersistentHeapCollectionBase(const PersistentHeapCollectionBase& other) : Co llection(other) 525 PersistentHeapCollectionBase(const PersistentHeapCollectionBase& other) : Co llection(other)
526 { 526 {
527 initialize(); 527 initialize();
528 } 528 }
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 // TODO(sof): extend WTF::FunctionWrapper call overloading to also handle (C rossThread)WeakPersistent. 1504 // TODO(sof): extend WTF::FunctionWrapper call overloading to also handle (C rossThread)WeakPersistent.
1505 static T* unwrap(const StorageType& value) { return value.get(); } 1505 static T* unwrap(const StorageType& value) { return value.get(); }
1506 }; 1506 };
1507 1507
1508 template<typename T> 1508 template<typename T>
1509 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; 1509 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete;
1510 1510
1511 } // namespace WTF 1511 } // namespace WTF
1512 1512
1513 #endif 1513 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/DefaultAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698