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

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

Issue 661603005: Oilpan: Introduce class MainThreadOnly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | « no previous file | Source/platform/heap/Heap.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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 class CrossThreadPersistent : public Persistent<T, GlobalPersistents> { 637 class CrossThreadPersistent : public Persistent<T, GlobalPersistents> {
638 WTF_DISALLOW_CONSTRUCTION_FROM_ZERO(CrossThreadPersistent); 638 WTF_DISALLOW_CONSTRUCTION_FROM_ZERO(CrossThreadPersistent);
639 WTF_DISALLOW_ZERO_ASSIGNMENT(CrossThreadPersistent); 639 WTF_DISALLOW_ZERO_ASSIGNMENT(CrossThreadPersistent);
640 public: 640 public:
641 CrossThreadPersistent(T* raw) : Persistent<T, GlobalPersistents>(raw) { } 641 CrossThreadPersistent(T* raw) : Persistent<T, GlobalPersistents>(raw) { }
642 642
643 using Persistent<T, GlobalPersistents>::operator=; 643 using Persistent<T, GlobalPersistents>::operator=;
644 }; 644 };
645 645
646 // FIXME: derive affinity based on the collection. 646 // FIXME: derive affinity based on the collection.
647 template<typename Collection, ThreadAffinity Affinity = AnyThread> 647 template<typename Collection, ThreadAffinity Affinity = AnyThreadAffinity>
648 class PersistentHeapCollectionBase 648 class PersistentHeapCollectionBase
649 : public Collection 649 : public Collection
650 , public PersistentBase<ThreadLocalPersistents<Affinity>, PersistentHeapColl ectionBase<Collection, Affinity> > { 650 , public PersistentBase<ThreadLocalPersistents<Affinity>, PersistentHeapColl ectionBase<Collection, Affinity> > {
651 // We overload the various new and delete operators with using the WTF Defau ltAllocator to ensure persistent 651 // We overload the various new and delete operators with using the WTF Defau ltAllocator to ensure persistent
652 // heap collections are always allocated off-heap. This allows persistent co llections to be used in 652 // heap collections are always allocated off-heap. This allows persistent co llections to be used in
653 // DEFINE_STATIC_LOCAL et. al. 653 // DEFINE_STATIC_LOCAL et. al.
654 WTF_USE_ALLOCATOR(PersistentHeapCollectionBase, WTF::DefaultAllocator); 654 WTF_USE_ALLOCATOR(PersistentHeapCollectionBase, WTF::DefaultAllocator);
655 public: 655 public:
656 PersistentHeapCollectionBase() { } 656 PersistentHeapCollectionBase() { }
657 657
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 struct ParamStorageTraits<T*> : public PointerParamStorageTraits<T*, blink::IsGa rbageCollectedType<T>::value> { 1349 struct ParamStorageTraits<T*> : public PointerParamStorageTraits<T*, blink::IsGa rbageCollectedType<T>::value> {
1350 }; 1350 };
1351 1351
1352 template<typename T> 1352 template<typename T>
1353 struct ParamStorageTraits<RawPtr<T> > : public PointerParamStorageTraits<T*, bli nk::IsGarbageCollectedType<T>::value> { 1353 struct ParamStorageTraits<RawPtr<T> > : public PointerParamStorageTraits<T*, bli nk::IsGarbageCollectedType<T>::value> {
1354 }; 1354 };
1355 1355
1356 } // namespace WTF 1356 } // namespace WTF
1357 1357
1358 #endif 1358 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/platform/heap/Heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698