| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 #define USING_GARBAGE_COLLECTED_MIXIN(TYPE) \ | 916 #define USING_GARBAGE_COLLECTED_MIXIN(TYPE) \ |
| 917 DEFINE_GARBAGE_COLLECTED_MIXIN_METHODS(blink::Visitor*, TYPE) | 917 DEFINE_GARBAGE_COLLECTED_MIXIN_METHODS(blink::Visitor*, TYPE) |
| 918 #endif | 918 #endif |
| 919 | 919 |
| 920 #if ENABLE(OILPAN) | 920 #if ENABLE(OILPAN) |
| 921 #define WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TYPE) USING_GARBAGE_COLLECTED_MIXI
N(TYPE) | 921 #define WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TYPE) USING_GARBAGE_COLLECTED_MIXI
N(TYPE) |
| 922 #else | 922 #else |
| 923 #define WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TYPE) | 923 #define WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TYPE) |
| 924 #endif | 924 #endif |
| 925 | 925 |
| 926 // Template to determine if a class is a GarbageCollectedMixin by checking if it |
| 927 // has IsGarbageCollectedMixinMarker |
| 928 template<typename T> |
| 929 struct IsGarbageCollectedMixin { |
| 930 private: |
| 931 typedef char YesType; |
| 932 struct NoType { |
| 933 char padding[8]; |
| 934 }; |
| 935 |
| 936 template <typename U> static YesType checkMarker(typename U::IsGarbageCollec
tedMixinMarker*); |
| 937 template <typename U> static NoType checkMarker(...); |
| 938 |
| 939 public: |
| 940 static const bool value = sizeof(checkMarker<T>(nullptr)) == sizeof(YesType)
; |
| 941 }; |
| 942 |
| 926 #if ENABLE(GC_PROFILING) | 943 #if ENABLE(GC_PROFILING) |
| 927 template<typename T> | 944 template<typename T> |
| 928 struct TypenameStringTrait { | 945 struct TypenameStringTrait { |
| 929 static const String& get() | 946 static const String& get() |
| 930 { | 947 { |
| 931 DEFINE_STATIC_LOCAL(String, typenameString, (WTF::extractTypeNameFromFun
ctionName(WTF::extractNameFunction<T>()))); | 948 DEFINE_STATIC_LOCAL(String, typenameString, (WTF::extractTypeNameFromFun
ctionName(WTF::extractNameFunction<T>()))); |
| 932 return typenameString; | 949 return typenameString; |
| 933 } | 950 } |
| 934 }; | 951 }; |
| 935 #endif | 952 #endif |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 struct GCInfoTrait { | 1016 struct GCInfoTrait { |
| 1000 static size_t index() | 1017 static size_t index() |
| 1001 { | 1018 { |
| 1002 return GCInfoAtBase<typename GetGarbageCollectedBase<T>::type>::index(); | 1019 return GCInfoAtBase<typename GetGarbageCollectedBase<T>::type>::index(); |
| 1003 } | 1020 } |
| 1004 }; | 1021 }; |
| 1005 | 1022 |
| 1006 } | 1023 } |
| 1007 | 1024 |
| 1008 #endif | 1025 #endif |
| OLD | NEW |