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

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

Issue 148523016: Move most of the [Pass]RefPtr's of CSSPrimitiveValue to our transition types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 382
383 template<typename T> 383 template<typename T>
384 class TraceTrait<Member<T> > { 384 class TraceTrait<Member<T> > {
385 public: 385 public:
386 static void trace(Visitor* visitor, void* self) 386 static void trace(Visitor* visitor, void* self)
387 { 387 {
388 TraceTrait<T>::mark(visitor, *static_cast<Member<T>*>(self)); 388 TraceTrait<T>::mark(visitor, *static_cast<Member<T>*>(self));
389 } 389 }
390 }; 390 };
391 391
392 // TraceTrait to allow compilation of trace method bodies when oilpan is disable d.
393 // This should never be called, but is needed to compile.
394 template<typename T>
395 class TraceTrait<RefPtr<T> > {
396 public:
397 static void trace(Visitor* visitor, void* self)
haraken 2014/02/12 14:05:45 |visitor| and |self| are not needed.
wibling-chromium 2014/02/12 14:42:19 Done.
398 {
399 ASSERT_NOT_REACHED();
400 }
401 };
402
392 // WeakMember is similar to Member in that it is used to point to other oilpan 403 // WeakMember is similar to Member in that it is used to point to other oilpan
393 // heap allocated objects. 404 // heap allocated objects.
394 // However instead of creating a strong pointer to the object, the WeakMember cr eates 405 // However instead of creating a strong pointer to the object, the WeakMember cr eates
395 // a weak pointer, which does not keep the pointee alive. Hence if all pointers to 406 // a weak pointer, which does not keep the pointee alive. Hence if all pointers to
396 // to a heap allocated object are weak the object will be garbage collected. At the 407 // to a heap allocated object are weak the object will be garbage collected. At the
397 // time of GC the weak pointers will automatically be set to null. 408 // time of GC the weak pointers will automatically be set to null.
398 template<typename T> 409 template<typename T>
399 class WeakMember : public Member<T> { 410 class WeakMember : public Member<T> {
400 public: 411 public:
401 WeakMember() : Member<T>() { } 412 WeakMember() : Member<T>() { }
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 }; 781 };
771 782
772 template<typename Key, typename Value, typename Extractor, typename Traits, type name KeyTraits> 783 template<typename Key, typename Value, typename Extractor, typename Traits, type name KeyTraits>
773 struct IsWeak<WebCore::HeapHashTableBacking<Key, Value, Extractor, Traits, KeyTr aits> > { 784 struct IsWeak<WebCore::HeapHashTableBacking<Key, Value, Extractor, Traits, KeyTr aits> > {
774 static const bool value = Traits::isWeak; 785 static const bool value = Traits::isWeak;
775 }; 786 };
776 787
777 } // namespace WTF 788 } // namespace WTF
778 789
779 #endif 790 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698