Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp

Issue 2577053002: ActiveScriptWrappable: GC wrappers in detached ExecutionContexts. (Closed)
Patch Set: component build fix(msvc) Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/csp/ContentSecurityPolicy.h" 10 #include "core/frame/csp/ContentSecurityPolicy.h"
11 #include "core/inspector/InspectorInstrumentation.h" 11 #include "core/inspector/InspectorInstrumentation.h"
12 #include "core/workers/InProcessWorkerMessagingProxy.h" 12 #include "core/workers/InProcessWorkerMessagingProxy.h"
13 #include "core/workers/WorkerScriptLoader.h" 13 #include "core/workers/WorkerScriptLoader.h"
14 #include <memory> 14 #include <memory>
15 15
16 namespace blink { 16 namespace blink {
17 17
18 InProcessWorkerBase::InProcessWorkerBase(ExecutionContext* context) 18 InProcessWorkerBase::InProcessWorkerBase(ExecutionContext* context)
19 : AbstractWorker(context), 19 : AbstractWorker(context),
20 ActiveScriptWrappable(this), 20 ActiveScriptWrappable<InProcessWorkerBase>(this),
21 m_contextProxy(nullptr) {} 21 m_contextProxy(nullptr) {}
22 22
23 InProcessWorkerBase::~InProcessWorkerBase() { 23 InProcessWorkerBase::~InProcessWorkerBase() {
24 DCHECK(isMainThread()); 24 DCHECK(isMainThread());
25 if (!m_contextProxy) 25 if (!m_contextProxy)
26 return; 26 return;
27 m_contextProxy->parentObjectDestroyed(); 27 m_contextProxy->parentObjectDestroyed();
28 } 28 }
29 29
30 void InProcessWorkerBase::postMessage(ExecutionContext* context, 30 void InProcessWorkerBase::postMessage(ExecutionContext* context,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 m_scriptLoader->script()); 104 m_scriptLoader->script());
105 } 105 }
106 m_scriptLoader = nullptr; 106 m_scriptLoader = nullptr;
107 } 107 }
108 108
109 DEFINE_TRACE(InProcessWorkerBase) { 109 DEFINE_TRACE(InProcessWorkerBase) {
110 AbstractWorker::trace(visitor); 110 AbstractWorker::trace(visitor);
111 } 111 }
112 112
113 } // namespace blink 113 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/workers/InProcessWorkerBase.h ('k') | third_party/WebKit/Source/core/workers/SharedWorker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698