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 #ifndef WorkerBackingThread_h | 5 #ifndef WorkerBackingThread_h |
6 #define WorkerBackingThread_h | 6 #define WorkerBackingThread_h |
7 | 7 |
| 8 #include <v8.h> |
| 9 #include <memory> |
8 #include "core/CoreExport.h" | 10 #include "core/CoreExport.h" |
9 #include "platform/heap/ThreadState.h" | 11 #include "platform/heap/ThreadState.h" |
10 #include "wtf/Forward.h" | 12 #include "wtf/Forward.h" |
11 #include "wtf/PtrUtil.h" | 13 #include "wtf/PtrUtil.h" |
12 #include "wtf/ThreadingPrimitives.h" | 14 #include "wtf/ThreadingPrimitives.h" |
13 #include <memory> | |
14 #include <v8.h> | |
15 | 15 |
16 namespace blink { | 16 namespace blink { |
17 | 17 |
18 class WebThread; | 18 class WebThread; |
19 class WebThreadSupportingGC; | 19 class WebThreadSupportingGC; |
20 | 20 |
21 // WorkerBackingThread represents a WebThread with Oilpan and V8 potentially | 21 // WorkerBackingThread represents a WebThread with Oilpan and V8 potentially |
22 // shared by multiple WebWorker scripts. A WebWorker needs to call initialize() | 22 // shared by multiple WebWorker scripts. A WebWorker needs to call initialize() |
23 // to using V8 and Oilpan functionalities, and call shutdown() when the script | 23 // to using V8 and Oilpan functionalities, and call shutdown() when the script |
24 // no longer needs the thread. | 24 // no longer needs the thread. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 std::unique_ptr<WebThreadSupportingGC> m_backingThread; | 72 std::unique_ptr<WebThreadSupportingGC> m_backingThread; |
73 v8::Isolate* m_isolate = nullptr; | 73 v8::Isolate* m_isolate = nullptr; |
74 bool m_isOwningThread; | 74 bool m_isOwningThread; |
75 bool m_shouldCallGCOnShutdown; | 75 bool m_shouldCallGCOnShutdown; |
76 }; | 76 }; |
77 | 77 |
78 } // namespace blink | 78 } // namespace blink |
79 | 79 |
80 #endif // WorkerBackingThread_h | 80 #endif // WorkerBackingThread_h |
OLD | NEW |