OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 return event; | 50 return event; |
51 } | 51 } |
52 | 52 |
53 // static | 53 // static |
54 SharedWorkerGlobalScope* SharedWorkerGlobalScope::create(const String& name, Sha
redWorkerThread* thread, std::unique_ptr<WorkerThreadStartupData> startupData) | 54 SharedWorkerGlobalScope* SharedWorkerGlobalScope::create(const String& name, Sha
redWorkerThread* thread, std::unique_ptr<WorkerThreadStartupData> startupData) |
55 { | 55 { |
56 // Note: startupData is finalized on return. After the relevant parts has be
en | 56 // Note: startupData is finalized on return. After the relevant parts has be
en |
57 // passed along to the created 'context'. | 57 // passed along to the created 'context'. |
58 SharedWorkerGlobalScope* context = new SharedWorkerGlobalScope(name, startup
Data->m_scriptURL, startupData->m_userAgent, thread, std::move(startupData->m_st
arterOriginPrivilegeData), startupData->m_workerClients.release()); | 58 SharedWorkerGlobalScope* context = new SharedWorkerGlobalScope(name, startup
Data->m_scriptURL, startupData->m_userAgent, thread, std::move(startupData->m_st
arterOriginPrivilegeData), startupData->m_workerClients.release()); |
59 context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurit
yPolicyHeaders); | 59 context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurit
yPolicyHeaders); |
| 60 context->setWorkerSettings(std::move(startupData->m_workerSettings)); |
60 if (!startupData->m_referrerPolicy.isNull()) | 61 if (!startupData->m_referrerPolicy.isNull()) |
61 context->parseAndSetReferrerPolicy(startupData->m_referrerPolicy); | 62 context->parseAndSetReferrerPolicy(startupData->m_referrerPolicy); |
62 context->setAddressSpace(startupData->m_addressSpace); | 63 context->setAddressSpace(startupData->m_addressSpace); |
63 OriginTrialContext::addTokens(context, startupData->m_originTrialTokens.get(
)); | 64 OriginTrialContext::addTokens(context, startupData->m_originTrialTokens.get(
)); |
64 return context; | 65 return context; |
65 } | 66 } |
66 | 67 |
67 SharedWorkerGlobalScope::SharedWorkerGlobalScope(const String& name, const KURL&
url, const String& userAgent, SharedWorkerThread* thread, std::unique_ptr<Secur
ityOrigin::PrivilegeData> starterOriginPrivilegeData, WorkerClients* workerClien
ts) | 68 SharedWorkerGlobalScope::SharedWorkerGlobalScope(const String& name, const KURL&
url, const String& userAgent, SharedWorkerThread* thread, std::unique_ptr<Secur
ityOrigin::PrivilegeData> starterOriginPrivilegeData, WorkerClients* workerClien
ts) |
68 : WorkerGlobalScope(url, userAgent, thread, monotonicallyIncreasingTime(), s
td::move(starterOriginPrivilegeData), workerClients) | 69 : WorkerGlobalScope(url, userAgent, thread, monotonicallyIncreasingTime(), s
td::move(starterOriginPrivilegeData), workerClients) |
69 , m_name(name) | 70 , m_name(name) |
(...skipping 20 matching lines...) Expand all Loading... |
90 if (WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(thread()->is
olate())) | 91 if (WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(thread()->is
olate())) |
91 debugger->exceptionThrown(errorMessage, std::move(location)); | 92 debugger->exceptionThrown(errorMessage, std::move(location)); |
92 } | 93 } |
93 | 94 |
94 DEFINE_TRACE(SharedWorkerGlobalScope) | 95 DEFINE_TRACE(SharedWorkerGlobalScope) |
95 { | 96 { |
96 WorkerGlobalScope::trace(visitor); | 97 WorkerGlobalScope::trace(visitor); |
97 } | 98 } |
98 | 99 |
99 } // namespace blink | 100 } // namespace blink |
OLD | NEW |