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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 { | 514 { |
515 ThreadedTesterBase::test(new ThreadedHeapTester); | 515 ThreadedTesterBase::test(new ThreadedHeapTester); |
516 } | 516 } |
517 | 517 |
518 ~ThreadedHeapTester() override | 518 ~ThreadedHeapTester() override |
519 { | 519 { |
520 // Verify that the threads cleared their CTPs when | 520 // Verify that the threads cleared their CTPs when |
521 // terminating, preventing access to a finalized heap. | 521 // terminating, preventing access to a finalized heap. |
522 for (auto& globalIntWrapper : m_crossPersistents) { | 522 for (auto& globalIntWrapper : m_crossPersistents) { |
523 ASSERT(globalIntWrapper.get()); | 523 ASSERT(globalIntWrapper.get()); |
524 EXPECT_FALSE(globalIntWrapper.get()->get()); | 524 EXPECT_FALSE(static_cast<bool>(*globalIntWrapper.get())); |
525 } | 525 } |
526 } | 526 } |
527 | 527 |
528 protected: | 528 protected: |
529 using GlobalIntWrapperPersistent = CrossThreadPersistent<IntWrapper>; | 529 using GlobalIntWrapperPersistent = CrossThreadPersistent<IntWrapper>; |
530 | 530 |
531 Mutex m_mutex; | 531 Mutex m_mutex; |
532 Vector<OwnPtr<GlobalIntWrapperPersistent>> m_crossPersistents; | 532 Vector<OwnPtr<GlobalIntWrapperPersistent>> m_crossPersistents; |
533 | 533 |
534 PassOwnPtr<GlobalIntWrapperPersistent> createGlobalPersistent(int value) | 534 PassOwnPtr<GlobalIntWrapperPersistent> createGlobalPersistent(int value) |
(...skipping 6387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6922 static_assert(WTF::IsGarbageCollectedType<HeapLinkedHashSet<Member<IntWrappe
r>>>::value, "HeapLinkedHashSet"); | 6922 static_assert(WTF::IsGarbageCollectedType<HeapLinkedHashSet<Member<IntWrappe
r>>>::value, "HeapLinkedHashSet"); |
6923 static_assert(WTF::IsGarbageCollectedType<HeapListHashSet<Member<IntWrapper>
>>::value, "HeapListHashSet"); | 6923 static_assert(WTF::IsGarbageCollectedType<HeapListHashSet<Member<IntWrapper>
>>::value, "HeapListHashSet"); |
6924 static_assert(WTF::IsGarbageCollectedType<HeapHashCountedSet<Member<IntWrapp
er>>>::value, "HeapHashCountedSet"); | 6924 static_assert(WTF::IsGarbageCollectedType<HeapHashCountedSet<Member<IntWrapp
er>>>::value, "HeapHashCountedSet"); |
6925 static_assert(WTF::IsGarbageCollectedType<HeapHashMap<int, Member<IntWrapper
>>>::value, "HeapHashMap"); | 6925 static_assert(WTF::IsGarbageCollectedType<HeapHashMap<int, Member<IntWrapper
>>>::value, "HeapHashMap"); |
6926 static_assert(WTF::IsGarbageCollectedType<HeapVector<Member<IntWrapper>>>::v
alue, "HeapVector"); | 6926 static_assert(WTF::IsGarbageCollectedType<HeapVector<Member<IntWrapper>>>::v
alue, "HeapVector"); |
6927 static_assert(WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::va
lue, "HeapDeque"); | 6927 static_assert(WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::va
lue, "HeapDeque"); |
6928 static_assert(WTF::IsGarbageCollectedType<HeapTerminatedArray<Member<IntWrap
per>>>::value, "HeapTerminatedArray"); | 6928 static_assert(WTF::IsGarbageCollectedType<HeapTerminatedArray<Member<IntWrap
per>>>::value, "HeapTerminatedArray"); |
6929 } | 6929 } |
6930 | 6930 |
6931 } // namespace blink | 6931 } // namespace blink |
OLD | NEW |