OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/workers/InProcessWorkerBase.h" | 5 #include "core/workers/InProcessWorkerBase.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
8 #include "core/events/MessageEvent.h" | 8 #include "core/events/MessageEvent.h" |
9 #include "core/fetch/ResourceFetcher.h" | 9 #include "core/fetch/ResourceFetcher.h" |
10 #include "core/frame/LocalDOMWindow.h" | 10 #include "core/frame/LocalDOMWindow.h" |
11 #include "core/frame/csp/ContentSecurityPolicy.h" | 11 #include "core/frame/csp/ContentSecurityPolicy.h" |
12 #include "core/inspector/InspectorInstrumentation.h" | 12 #include "core/inspector/InspectorInstrumentation.h" |
13 #include "core/workers/WorkerGlobalScopeProxy.h" | 13 #include "core/workers/WorkerGlobalScopeProxy.h" |
14 #include "core/workers/WorkerScriptLoader.h" | 14 #include "core/workers/WorkerScriptLoader.h" |
15 #include "core/workers/WorkerThread.h" | 15 #include "core/workers/WorkerThread.h" |
16 #include "platform/network/ContentSecurityPolicyResponseHeaders.h" | 16 #include "platform/network/ContentSecurityPolicyResponseHeaders.h" |
17 #include "wtf/MainThread.h" | 17 #include "wtf/MainThread.h" |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 | 20 |
21 InProcessWorkerBase::InProcessWorkerBase(ExecutionContext* context) | 21 InProcessWorkerBase::InProcessWorkerBase(ExecutionContext* context) |
22 : AbstractWorker(context) | 22 : AbstractWorker(context) |
| 23 , ActiveScriptWrappable(this) |
23 , m_contextProxy(nullptr) | 24 , m_contextProxy(nullptr) |
24 { | 25 { |
25 } | 26 } |
26 | 27 |
27 InProcessWorkerBase::~InProcessWorkerBase() | 28 InProcessWorkerBase::~InProcessWorkerBase() |
28 { | 29 { |
29 ASSERT(isMainThread()); | 30 ASSERT(isMainThread()); |
30 if (!m_contextProxy) | 31 if (!m_contextProxy) |
31 return; | 32 return; |
32 m_contextProxy->workerObjectDestroyed(); | 33 m_contextProxy->workerObjectDestroyed(); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 m_scriptLoader = nullptr; | 107 m_scriptLoader = nullptr; |
107 } | 108 } |
108 | 109 |
109 DEFINE_TRACE(InProcessWorkerBase) | 110 DEFINE_TRACE(InProcessWorkerBase) |
110 { | 111 { |
111 visitor->trace(m_contentSecurityPolicy); | 112 visitor->trace(m_contentSecurityPolicy); |
112 AbstractWorker::trace(visitor); | 113 AbstractWorker::trace(visitor); |
113 } | 114 } |
114 | 115 |
115 } // namespace blink | 116 } // namespace blink |
OLD | NEW |