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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp

Issue 2406333002: Remove CrossThreadPersistent::release (Closed)
Patch Set: added comment Created 4 years, 2 months 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 "modules/compositorworker/CompositorWorkerGlobalScope.h" 5 #include "modules/compositorworker/CompositorWorkerGlobalScope.h"
6 6
7 #include "bindings/core/v8/SerializedScriptValue.h" 7 #include "bindings/core/v8/SerializedScriptValue.h"
8 #include "core/workers/InProcessWorkerObjectProxy.h" 8 #include "core/workers/InProcessWorkerObjectProxy.h"
9 #include "core/workers/WorkerThreadStartupData.h" 9 #include "core/workers/WorkerThreadStartupData.h"
10 #include "modules/EventTargetModules.h" 10 #include "modules/EventTargetModules.h"
11 #include "modules/compositorworker/CompositorWorkerThread.h" 11 #include "modules/compositorworker/CompositorWorkerThread.h"
12 #include "wtf/AutoReset.h" 12 #include "wtf/AutoReset.h"
13 #include <memory> 13 #include <memory>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 CompositorWorkerGlobalScope* CompositorWorkerGlobalScope::create( 17 CompositorWorkerGlobalScope* CompositorWorkerGlobalScope::create(
18 CompositorWorkerThread* thread, 18 CompositorWorkerThread* thread,
19 std::unique_ptr<WorkerThreadStartupData> startupData, 19 std::unique_ptr<WorkerThreadStartupData> startupData,
20 double timeOrigin) { 20 double timeOrigin) {
21 // Note: startupData is finalized on return. After the relevant parts has been 21 // Note: startupData is finalized on return. After the relevant parts has been
22 // passed along to the created 'context'. 22 // passed along to the created 'context'.
23 CompositorWorkerGlobalScope* context = new CompositorWorkerGlobalScope( 23 CompositorWorkerGlobalScope* context = new CompositorWorkerGlobalScope(
24 startupData->m_scriptURL, startupData->m_userAgent, thread, timeOrigin, 24 startupData->m_scriptURL, startupData->m_userAgent, thread, timeOrigin,
25 std::move(startupData->m_starterOriginPrivilegeData), 25 std::move(startupData->m_starterOriginPrivilegeData),
26 startupData->m_workerClients.release()); 26 startupData->m_workerClients);
27 context->applyContentSecurityPolicyFromVector( 27 context->applyContentSecurityPolicyFromVector(
28 *startupData->m_contentSecurityPolicyHeaders); 28 *startupData->m_contentSecurityPolicyHeaders);
29 if (!startupData->m_referrerPolicy.isNull()) 29 if (!startupData->m_referrerPolicy.isNull())
30 context->parseAndSetReferrerPolicy(startupData->m_referrerPolicy); 30 context->parseAndSetReferrerPolicy(startupData->m_referrerPolicy);
31 context->setAddressSpace(startupData->m_addressSpace); 31 context->setAddressSpace(startupData->m_addressSpace);
32 return context; 32 return context;
33 } 33 }
34 34
35 CompositorWorkerGlobalScope::CompositorWorkerGlobalScope( 35 CompositorWorkerGlobalScope::CompositorWorkerGlobalScope(
36 const KURL& url, 36 const KURL& url,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 AutoReset<bool> temporaryChange(&m_executingAnimationFrameCallbacks, true); 98 AutoReset<bool> temporaryChange(&m_executingAnimationFrameCallbacks, true);
99 m_callbackCollection.executeCallbacks(highResTimeMs, highResTimeMs); 99 m_callbackCollection.executeCallbacks(highResTimeMs, highResTimeMs);
100 return !m_callbackCollection.isEmpty(); 100 return !m_callbackCollection.isEmpty();
101 } 101 }
102 102
103 CompositorWorkerThread* CompositorWorkerGlobalScope::thread() const { 103 CompositorWorkerThread* CompositorWorkerGlobalScope::thread() const {
104 return static_cast<CompositorWorkerThread*>(WorkerGlobalScope::thread()); 104 return static_cast<CompositorWorkerThread*>(WorkerGlobalScope::thread());
105 } 105 }
106 106
107 } // namespace blink 107 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698