| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 CrossThreadPersistent(T& raw) : Parent(raw) { } | 332 CrossThreadPersistent(T& raw) : Parent(raw) { } |
| 333 CrossThreadPersistent(const CrossThreadPersistent& other) : Parent(other) {
} | 333 CrossThreadPersistent(const CrossThreadPersistent& other) : Parent(other) {
} |
| 334 template<typename U> | 334 template<typename U> |
| 335 CrossThreadPersistent(const CrossThreadPersistent<U>& other) : Parent(other)
{ } | 335 CrossThreadPersistent(const CrossThreadPersistent<U>& other) : Parent(other)
{ } |
| 336 template<typename U> | 336 template<typename U> |
| 337 CrossThreadPersistent(const Member<U>& other) : Parent(other) { } | 337 CrossThreadPersistent(const Member<U>& other) : Parent(other) { } |
| 338 template<typename U> | 338 template<typename U> |
| 339 CrossThreadPersistent(const RawPtr<U>& other) : Parent(other.get()) { } | 339 CrossThreadPersistent(const RawPtr<U>& other) : Parent(other.get()) { } |
| 340 }; | 340 }; |
| 341 | 341 |
| 342 // Combines the behavior of CrossThreadPersistent and WeakPersistent. |
| 342 template<typename T> | 343 template<typename T> |
| 343 class CrossThreadWeakPersistent : public PersistentBase<T, WeakPersistentConfigu
ration, CrossThreadPersistentConfiguration> { | 344 class CrossThreadWeakPersistent : public PersistentBase<T, WeakPersistentConfigu
ration, CrossThreadPersistentConfiguration> { |
| 344 typedef PersistentBase<T, WeakPersistentConfiguration, CrossThreadPersistent
Configuration> Parent; | 345 typedef PersistentBase<T, WeakPersistentConfiguration, CrossThreadPersistent
Configuration> Parent; |
| 345 public: | 346 public: |
| 346 CrossThreadWeakPersistent() : Parent() { } | 347 CrossThreadWeakPersistent() : Parent() { } |
| 347 CrossThreadWeakPersistent(std::nullptr_t) : Parent(nullptr) { } | 348 CrossThreadWeakPersistent(std::nullptr_t) : Parent(nullptr) { } |
| 348 CrossThreadWeakPersistent(T* raw) : Parent(raw) { } | 349 CrossThreadWeakPersistent(T* raw) : Parent(raw) { } |
| 349 CrossThreadWeakPersistent(T& raw) : Parent(raw) { } | 350 CrossThreadWeakPersistent(T& raw) : Parent(raw) { } |
| 350 CrossThreadWeakPersistent(const CrossThreadWeakPersistent& other) : Parent(o
ther) { } | 351 CrossThreadWeakPersistent(const CrossThreadWeakPersistent& other) : Parent(o
ther) { } |
| 351 template<typename U> | 352 template<typename U> |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { | 1180 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { |
| 1180 static_assert(sizeof(T), "T must be fully defined"); | 1181 static_assert(sizeof(T), "T must be fully defined"); |
| 1181 }; | 1182 }; |
| 1182 | 1183 |
| 1183 template<typename T> | 1184 template<typename T> |
| 1184 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 1185 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
| 1185 | 1186 |
| 1186 } // namespace WTF | 1187 } // namespace WTF |
| 1187 | 1188 |
| 1188 #endif | 1189 #endif |
| OLD | NEW |