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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 ServiceWorkerGlobalScope* ServiceWorkerGlobalScope::create( 71 ServiceWorkerGlobalScope* ServiceWorkerGlobalScope::create(
72 ServiceWorkerThread* thread, 72 ServiceWorkerThread* thread,
73 std::unique_ptr<WorkerThreadStartupData> startupData) { 73 std::unique_ptr<WorkerThreadStartupData> startupData) {
74 // Note: startupData is finalized on return. After the relevant parts has been 74 // Note: startupData is finalized on return. After the relevant parts has been
75 // passed along to the created 'context'. 75 // passed along to the created 'context'.
76 ServiceWorkerGlobalScope* context = new ServiceWorkerGlobalScope( 76 ServiceWorkerGlobalScope* context = new ServiceWorkerGlobalScope(
77 startupData->m_scriptURL, startupData->m_userAgent, thread, 77 startupData->m_scriptURL, startupData->m_userAgent, thread,
78 monotonicallyIncreasingTime(), 78 monotonicallyIncreasingTime(),
79 std::move(startupData->m_starterOriginPrivilegeData), 79 std::move(startupData->m_starterOriginPrivilegeData),
80 startupData->m_workerClients.release()); 80 startupData->m_workerClients);
81 81
82 context->setV8CacheOptions(startupData->m_v8CacheOptions); 82 context->setV8CacheOptions(startupData->m_v8CacheOptions);
83 context->applyContentSecurityPolicyFromVector( 83 context->applyContentSecurityPolicyFromVector(
84 *startupData->m_contentSecurityPolicyHeaders); 84 *startupData->m_contentSecurityPolicyHeaders);
85 if (!startupData->m_referrerPolicy.isNull()) 85 if (!startupData->m_referrerPolicy.isNull())
86 context->parseAndSetReferrerPolicy(startupData->m_referrerPolicy); 86 context->parseAndSetReferrerPolicy(startupData->m_referrerPolicy);
87 context->setAddressSpace(startupData->m_addressSpace); 87 context->setAddressSpace(startupData->m_addressSpace);
88 OriginTrialContext::addTokens(context, 88 OriginTrialContext::addTokens(context,
89 startupData->m_originTrialTokens.get()); 89 startupData->m_originTrialTokens.get());
90 90
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 255
256 void ServiceWorkerGlobalScope::exceptionThrown(ErrorEvent* event) { 256 void ServiceWorkerGlobalScope::exceptionThrown(ErrorEvent* event) {
257 WorkerGlobalScope::exceptionThrown(event); 257 WorkerGlobalScope::exceptionThrown(event);
258 if (WorkerThreadDebugger* debugger = 258 if (WorkerThreadDebugger* debugger =
259 WorkerThreadDebugger::from(thread()->isolate())) 259 WorkerThreadDebugger::from(thread()->isolate()))
260 debugger->exceptionThrown(event); 260 debugger->exceptionThrown(event);
261 } 261 }
262 262
263 } // namespace blink 263 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698