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

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

Issue 633463002: Rename ObjectAliveTrait::isAlive() to isHeapObjectAlive(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« no previous file with comments | « no previous file | Source/platform/heap/Visitor.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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // GarbageCollectedMixin because casting to it is potentially ambiguous. 50 // GarbageCollectedMixin because casting to it is potentially ambiguous.
51 template<typename T> 51 template<typename T>
52 struct IsGarbageCollectedMixin { 52 struct IsGarbageCollectedMixin {
53 typedef char TrueType; 53 typedef char TrueType;
54 struct FalseType { 54 struct FalseType {
55 char dummy[2]; 55 char dummy[2];
56 }; 56 };
57 57
58 #if COMPILER(MSVC) 58 #if COMPILER(MSVC)
59 template<typename U> static TrueType hasAdjustAndMark(char[&U::adjustAndMark != 0]); 59 template<typename U> static TrueType hasAdjustAndMark(char[&U::adjustAndMark != 0]);
60 template<typename U> static TrueType hasIsAlive(char[&U::isAlive != 0]); 60 template<typename U> static TrueType hasIsHeapObjectAlive(char[&U::isHeapObj ectAlive != 0]);
61 #else 61 #else
62 template<size_t> struct F; 62 template<size_t> struct F;
63 template<typename U> static TrueType hasAdjustAndMark(F<sizeof(&U::adjustAnd Mark)>*); 63 template<typename U> static TrueType hasAdjustAndMark(F<sizeof(&U::adjustAnd Mark)>*);
64 template<typename U> static TrueType hasIsAlive(F<sizeof(&U::isAlive)>*); 64 template<typename U> static TrueType hasIsHeapObjectAlive(F<sizeof(&U::isHea pObjectAlive)>*);
65 #endif 65 #endif
66 template<typename U> static FalseType hasIsAlive(...); 66 template<typename U> static FalseType hasIsHeapObjectAlive(...);
67 template<typename U> static FalseType hasAdjustAndMark(...); 67 template<typename U> static FalseType hasAdjustAndMark(...);
68 68
69 static bool const value = (sizeof(TrueType) == sizeof(hasAdjustAndMark<T>(0) )) && (sizeof(TrueType) == sizeof(hasIsAlive<T>(0))); 69 static bool const value = (sizeof(TrueType) == sizeof(hasAdjustAndMark<T>(0) )) && (sizeof(TrueType) == sizeof(hasIsHeapObjectAlive<T>(0)));
70 }; 70 };
71 71
72 template <typename T> 72 template <typename T>
73 struct IsGarbageCollectedType { 73 struct IsGarbageCollectedType {
74 typedef char TrueType; 74 typedef char TrueType;
75 struct FalseType { 75 struct FalseType {
76 char dummy[2]; 76 char dummy[2];
77 }; 77 };
78 78
79 typedef typename WTF::RemoveConst<T>::Type NonConstType; 79 typedef typename WTF::RemoveConst<T>::Type NonConstType;
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 struct ParamStorageTraits<T*> : public PointerParamStorageTraits<T*, blink::IsGa rbageCollectedType<T>::value> { 1396 struct ParamStorageTraits<T*> : public PointerParamStorageTraits<T*, blink::IsGa rbageCollectedType<T>::value> {
1397 }; 1397 };
1398 1398
1399 template<typename T> 1399 template<typename T>
1400 struct ParamStorageTraits<RawPtr<T> > : public PointerParamStorageTraits<T*, bli nk::IsGarbageCollectedType<T>::value> { 1400 struct ParamStorageTraits<RawPtr<T> > : public PointerParamStorageTraits<T*, bli nk::IsGarbageCollectedType<T>::value> {
1401 }; 1401 };
1402 1402
1403 } // namespace WTF 1403 } // namespace WTF
1404 1404
1405 #endif 1405 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698