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

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

Issue 2207333002: Support CrossThreadWeakPersistent PostTask on per thread heap enabled thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Persistent_h 5 #ifndef Persistent_h
6 #define Persistent_h 6 #define Persistent_h
7 7
8 #include "platform/heap/Heap.h" 8 #include "platform/heap/Heap.h"
9 #include "platform/heap/Member.h" 9 #include "platform/heap/Member.h"
10 #include "platform/heap/PersistentNode.h" 10 #include "platform/heap/PersistentNode.h"
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 } // namespace WTF 759 } // namespace WTF
760 760
761 namespace base { 761 namespace base {
762 762
763 template <typename T> 763 template <typename T>
764 struct IsWeakReceiver<blink::WeakPersistent<T>> : std::true_type {}; 764 struct IsWeakReceiver<blink::WeakPersistent<T>> : std::true_type {};
765 765
766 template <typename T> 766 template <typename T>
767 struct IsWeakReceiver<blink::CrossThreadWeakPersistent<T>> : std::true_type {}; 767 struct IsWeakReceiver<blink::CrossThreadWeakPersistent<T>> : std::true_type {};
768 768
769 template <typename T>
770 struct BindUnwrapTraits<blink::CrossThreadWeakPersistent<T>> {
771 static blink::CrossThreadPersistent<T> Unwrap(const blink::CrossThreadWeakPe rsistent<T>& wrapped)
772 {
773 blink::CrossThreadPersistentRegion::LockScope persistentLock(blink::Proc essHeap::crossThreadPersistentRegion());
774 return blink::CrossThreadPersistent<T>(wrapped.get());
775 }
776 };
777
769 } 778 }
770 779
771 #endif // Persistent_h 780 #endif // Persistent_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698