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 "platform/heap/MessageLoopInterruptor.h" | 8 #include "platform/heap/GCTaskRunner.h" |
9 #include "platform/heap/PendingGCRunner.h" | |
10 #include "public/platform/Platform.h" | 9 #include "public/platform/Platform.h" |
11 #include "public/platform/WebTaskRunner.h" | 10 #include "public/platform/WebTaskRunner.h" |
12 #include "public/platform/WebThread.h" | 11 #include "public/platform/WebThread.h" |
13 #include "wtf/Noncopyable.h" | 12 #include "wtf/Noncopyable.h" |
14 #include "wtf/OwnPtr.h" | 13 #include "wtf/OwnPtr.h" |
15 #include "wtf/PassOwnPtr.h" | 14 #include "wtf/PassOwnPtr.h" |
16 | 15 |
17 namespace blink { | 16 namespace blink { |
18 | 17 |
19 // WebThreadSupportingGC wraps a WebThread and adds support for attaching | 18 // WebThreadSupportingGC wraps a WebThread and adds support for attaching |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 61 |
63 WebThread& platformThread() const | 62 WebThread& platformThread() const |
64 { | 63 { |
65 ASSERT(m_thread); | 64 ASSERT(m_thread); |
66 return *m_thread; | 65 return *m_thread; |
67 } | 66 } |
68 | 67 |
69 private: | 68 private: |
70 WebThreadSupportingGC(const char* name, WebThread*); | 69 WebThreadSupportingGC(const char* name, WebThread*); |
71 | 70 |
72 OwnPtr<PendingGCRunner> m_pendingGCRunner; | 71 OwnPtr<GCTaskRunner> m_gcTaskRunner; |
73 | 72 |
74 // m_thread is guaranteed to be non-null after this instance is constructed. | 73 // m_thread is guaranteed to be non-null after this instance is constructed. |
75 // m_owningThread is non-null unless this instance is constructed for an | 74 // m_owningThread is non-null unless this instance is constructed for an |
76 // existing thread via createForThread(). | 75 // existing thread via createForThread(). |
77 WebThread* m_thread = nullptr; | 76 WebThread* m_thread = nullptr; |
78 OwnPtr<WebThread> m_owningThread; | 77 OwnPtr<WebThread> m_owningThread; |
79 }; | 78 }; |
80 | 79 |
81 } | 80 } |
82 | 81 |
83 #endif | 82 #endif |
OLD | NEW |