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

Side by Side Diff: sky/engine/platform/Supplementable.h

Issue 678003003: Begin to remove heap/* (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 | « sky/engine/platform/BUILD.gn ('k') | sky/engine/platform/TaskSynchronizer.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) 2012 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 template<typename T> 249 template<typename T>
250 class Supplement : public SupplementBase<T, false> { }; 250 class Supplement : public SupplementBase<T, false> { };
251 251
252 // This class is used to make an off-heap class supplementable with off-heap 252 // This class is used to make an off-heap class supplementable with off-heap
253 // supplements (Supplement). 253 // supplements (Supplement).
254 template<typename T> 254 template<typename T>
255 class GC_PLUGIN_IGNORE("http://crbug.com/395036") Supplementable : public Supple mentableBase<T, false> { 255 class GC_PLUGIN_IGNORE("http://crbug.com/395036") Supplementable : public Supple mentableBase<T, false> {
256 public: 256 public:
257 virtual void trace(Visitor* visitor) 257 virtual void trace(Visitor* visitor)
258 { 258 {
259 // No tracing of off-heap supplements. We should not have any Supplement able
260 // object on the heap. Either the object is HeapSupplementable or if it is
261 // off heap it should use PersistentHeapSupplementable to trace any on-h eap
262 // supplements.
263 COMPILE_ASSERT(!IsGarbageCollectedType<T>::value, GarbageCollectedObject MustBeHeapSupplementable);
264 SupplementableBase<T, false>::trace(visitor);
265 } 259 }
266 }; 260 };
267 261
268 template<typename T> 262 template<typename T>
269 struct ThreadingTrait<SupplementBase<T, true> > { 263 struct ThreadingTrait<SupplementBase<T, true> > {
270 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; 264 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity;
271 }; 265 };
272 266
273 template<typename T> 267 template<typename T>
274 struct ThreadingTrait<SupplementableBase<T, true> > { 268 struct ThreadingTrait<SupplementableBase<T, true> > {
275 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; 269 static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity;
276 }; 270 };
277 271
278 } // namespace blink 272 } // namespace blink
279 273
280 #endif // Supplementable_h 274 #endif // Supplementable_h
OLDNEW
« no previous file with comments | « sky/engine/platform/BUILD.gn ('k') | sky/engine/platform/TaskSynchronizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698