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

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

Issue 267323004: Oilpan: Move ThreadableWebSocketChannelClientWrapper to Oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // Unlike Persistent, we can destruct a CrossThreadPersistent in a thread 397 // Unlike Persistent, we can destruct a CrossThreadPersistent in a thread
398 // different from the construction thread. 398 // different from the construction thread.
399 template<typename T> 399 template<typename T>
400 class CrossThreadPersistent : public Persistent<T, GlobalPersistents> { 400 class CrossThreadPersistent : public Persistent<T, GlobalPersistents> {
401 WTF_DISALLOW_CONSTRUCTION_FROM_ZERO(CrossThreadPersistent); 401 WTF_DISALLOW_CONSTRUCTION_FROM_ZERO(CrossThreadPersistent);
402 WTF_DISALLOW_ZERO_ASSIGNMENT(CrossThreadPersistent); 402 WTF_DISALLOW_ZERO_ASSIGNMENT(CrossThreadPersistent);
403 public: 403 public:
404 CrossThreadPersistent(T* raw) : Persistent<T, GlobalPersistents>(raw) { } 404 CrossThreadPersistent(T* raw) : Persistent<T, GlobalPersistents>(raw) { }
405 405
406 using Persistent<T, GlobalPersistents>::operator=; 406 using Persistent<T, GlobalPersistents>::operator=;
407 using Persistent<T, GlobalPersistents>::operator RawPtr<T>;
407 }; 408 };
408 409
409 // FIXME: derive affinity based on the collection. 410 // FIXME: derive affinity based on the collection.
410 template<typename Collection, ThreadAffinity Affinity = AnyThread> 411 template<typename Collection, ThreadAffinity Affinity = AnyThread>
411 class PersistentHeapCollectionBase 412 class PersistentHeapCollectionBase
412 : public Collection 413 : public Collection
413 , public PersistentBase<ThreadLocalPersistents<Affinity>, PersistentHeapColl ectionBase<Collection, Affinity> > { 414 , public PersistentBase<ThreadLocalPersistents<Affinity>, PersistentHeapColl ectionBase<Collection, Affinity> > {
414 // We overload the various new and delete operators with using the WTF Defau ltAllocator to ensure persistent 415 // We overload the various new and delete operators with using the WTF Defau ltAllocator to ensure persistent
415 // heap collections are always allocated off-heap. This allows persistent co llections to be used in 416 // heap collections are always allocated off-heap. This allows persistent co llections to be used in
416 // DEFINE_STATIC_LOCAL et. al. 417 // DEFINE_STATIC_LOCAL et. al.
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 struct NeedsTracing<ListHashSetNode<T, WebCore::HeapListHashSetAllocator<T, inli neCapacity> > *> { 1121 struct NeedsTracing<ListHashSetNode<T, WebCore::HeapListHashSetAllocator<T, inli neCapacity> > *> {
1121 // All heap allocated node pointers need visiting to keep the nodes alive, 1122 // All heap allocated node pointers need visiting to keep the nodes alive,
1122 // regardless of whether they contain pointers to other heap allocated 1123 // regardless of whether they contain pointers to other heap allocated
1123 // objects. 1124 // objects.
1124 static const bool value = true; 1125 static const bool value = true;
1125 }; 1126 };
1126 1127
1127 } // namespace WTF 1128 } // namespace WTF
1128 1129
1129 #endif 1130 #endif
OLDNEW
« Source/core/dom/CrossThreadTask.h ('K') | « Source/platform/CrossThreadCopier.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698