OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 WebThreadSupportingGC_h | 5 #ifndef WebThreadSupportingGC_h |
6 #define WebThreadSupportingGC_h | 6 #define WebThreadSupportingGC_h |
7 | 7 |
| 8 #include <memory> |
8 #include "platform/WebTaskRunner.h" | 9 #include "platform/WebTaskRunner.h" |
9 #include "platform/heap/GCTaskRunner.h" | 10 #include "platform/heap/GCTaskRunner.h" |
10 #include "public/platform/Platform.h" | 11 #include "public/platform/Platform.h" |
11 #include "public/platform/WebThread.h" | 12 #include "public/platform/WebThread.h" |
12 #include "wtf/Allocator.h" | 13 #include "wtf/Allocator.h" |
13 #include "wtf/Noncopyable.h" | 14 #include "wtf/Noncopyable.h" |
14 #include <memory> | |
15 | 15 |
16 namespace blink { | 16 namespace blink { |
17 | 17 |
18 // WebThreadSupportingGC wraps a WebThread and adds support for attaching | 18 // WebThreadSupportingGC wraps a WebThread and adds support for attaching |
19 // to and detaching from the Blink GC infrastructure. The initialize method | 19 // to and detaching from the Blink GC infrastructure. The initialize method |
20 // must be called during initialization on the WebThread and before the | 20 // must be called during initialization on the WebThread and before the |
21 // thread allocates any objects managed by the Blink GC. The shutdown | 21 // thread allocates any objects managed by the Blink GC. The shutdown |
22 // method must be called on the WebThread during shutdown when the thread | 22 // method must be called on the WebThread during shutdown when the thread |
23 // no longer needs to access objects managed by the Blink GC. | 23 // no longer needs to access objects managed by the Blink GC. |
24 // | 24 // |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // m_thread is guaranteed to be non-null after this instance is constructed. | 83 // m_thread is guaranteed to be non-null after this instance is constructed. |
84 // m_owningThread is non-null unless this instance is constructed for an | 84 // m_owningThread is non-null unless this instance is constructed for an |
85 // existing thread via createForThread(). | 85 // existing thread via createForThread(). |
86 WebThread* m_thread = nullptr; | 86 WebThread* m_thread = nullptr; |
87 std::unique_ptr<WebThread> m_owningThread; | 87 std::unique_ptr<WebThread> m_owningThread; |
88 }; | 88 }; |
89 | 89 |
90 } // namespace blink | 90 } // namespace blink |
91 | 91 |
92 #endif | 92 #endif |
OLD | NEW |