OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "platform/heap/Persistent.h" | 5 #include "platform/heap/Persistent.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "platform/CrossThreadFunctional.h" | 8 #include "platform/CrossThreadFunctional.h" |
8 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 #include <memory> | |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 namespace { | 13 namespace { |
14 | 14 |
15 void PreciselyCollectGarbage() { | 15 void PreciselyCollectGarbage() { |
16 ThreadState::Current()->CollectGarbage(BlinkGC::kNoHeapPointersOnStack, | 16 ThreadState::Current()->CollectGarbage(BlinkGC::kNoHeapPointersOnStack, |
17 BlinkGC::kGCWithSweep, | 17 BlinkGC::kGCWithSweep, |
18 BlinkGC::kForcedGC); | 18 BlinkGC::kForcedGC); |
19 } | 19 } |
20 | 20 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 EXPECT_EQ(1, counter); | 52 EXPECT_EQ(1, counter); |
53 | 53 |
54 receiver = nullptr; | 54 receiver = nullptr; |
55 PreciselyCollectGarbage(); | 55 PreciselyCollectGarbage(); |
56 (*function)(); | 56 (*function)(); |
57 EXPECT_EQ(1, counter); | 57 EXPECT_EQ(1, counter); |
58 } | 58 } |
59 | 59 |
60 } // namespace | 60 } // namespace |
61 } // namespace blink | 61 } // namespace blink |
OLD | NEW |