| OLD | NEW |
| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 friend class WrapperPersistentRegion; | 212 friend class WrapperPersistentRegion; |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 template<typename T> | 215 template<typename T> |
| 216 class WrapperPersistent FINAL : public WrapperPersistentNode { | 216 class WrapperPersistent FINAL : public WrapperPersistentNode { |
| 217 ALLOW_ONLY_INLINE_ALLOCATION(); | 217 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 218 public: | 218 public: |
| 219 static WrapperPersistent<T>* create(T* raw); | 219 static WrapperPersistent<T>* create(T* raw); |
| 220 | 220 |
| 221 virtual void trace(Visitor* visitor) OVERRIDE | 221 virtual void trace(Visitor* visitor) override |
| 222 { | 222 { |
| 223 ASSERT(isAlive()); | 223 ASSERT(isAlive()); |
| 224 visitor->mark(static_cast<T*>(m_raw)); | 224 visitor->mark(static_cast<T*>(m_raw)); |
| 225 } | 225 } |
| 226 | 226 |
| 227 private: | 227 private: |
| 228 WrapperPersistent() { } | 228 WrapperPersistent() { } |
| 229 | 229 |
| 230 // We need to use a constructor to initialize the allocated slot since it | 230 // We need to use a constructor to initialize the allocated slot since it |
| 231 // has a vtable which must be set to the WrapperPersistent<T> type. | 231 // has a vtable which must be set to the WrapperPersistent<T> type. |
| (...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |