OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef GarbageCollected_h | 5 #ifndef GarbageCollected_h |
6 #define GarbageCollected_h | 6 #define GarbageCollected_h |
7 | 7 |
8 #include "platform/heap/ThreadState.h" | 8 #include "platform/heap/ThreadState.h" |
9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
10 #include "wtf/Assertions.h" | 10 #include "wtf/Assertions.h" |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 | 386 |
387 template<typename U, size_t sz = sizeof(U)> static TrueType isSizeofKnown(U*
); | 387 template<typename U, size_t sz = sizeof(U)> static TrueType isSizeofKnown(U*
); |
388 static FalseType isSizeofKnown(...); | 388 static FalseType isSizeofKnown(...); |
389 static T& t; | 389 static T& t; |
390 public: | 390 public: |
391 static const bool value = sizeof(TrueType) == sizeof(isSizeofKnown(&t)); | 391 static const bool value = sizeof(TrueType) == sizeof(isSizeofKnown(&t)); |
392 }; | 392 }; |
393 | 393 |
394 } // namespace blink | 394 } // namespace blink |
395 | 395 |
| 396 namespace WTF { |
| 397 |
| 398 // Adoption is not needed nor wanted for RefCountedGarbageCollected<>-derived ty
pes. |
| 399 template<typename T> |
| 400 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
| 401 |
| 402 } // namespace WTF |
| 403 |
396 #endif | 404 #endif |
OLD | NEW |