| OLD | NEW |
| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 ServiceWorkerThread* thread, | 71 ServiceWorkerThread* thread, |
| 72 std::unique_ptr<WorkerThreadStartupData> startupData) { | 72 std::unique_ptr<WorkerThreadStartupData> startupData) { |
| 73 // Note: startupData is finalized on return. After the relevant parts has been | 73 // Note: startupData is finalized on return. After the relevant parts has been |
| 74 // passed along to the created 'context'. | 74 // passed along to the created 'context'. |
| 75 ServiceWorkerGlobalScope* context = new ServiceWorkerGlobalScope( | 75 ServiceWorkerGlobalScope* context = new ServiceWorkerGlobalScope( |
| 76 startupData->m_scriptURL, startupData->m_userAgent, thread, | 76 startupData->m_scriptURL, startupData->m_userAgent, thread, |
| 77 monotonicallyIncreasingTime(), | 77 monotonicallyIncreasingTime(), |
| 78 std::move(startupData->m_starterOriginPrivilegeData), | 78 std::move(startupData->m_starterOriginPrivilegeData), |
| 79 startupData->m_workerClients); | 79 startupData->m_workerClients); |
| 80 | 80 |
| 81 context->setV8CacheOptions(startupData->m_v8CacheOptions); | 81 context->setV8CacheOptions(startupData->m_workerV8Settings.m_v8CacheOptions); |
| 82 context->applyContentSecurityPolicyFromVector( | 82 context->applyContentSecurityPolicyFromVector( |
| 83 *startupData->m_contentSecurityPolicyHeaders); | 83 *startupData->m_contentSecurityPolicyHeaders); |
| 84 if (!startupData->m_referrerPolicy.isNull()) | 84 if (!startupData->m_referrerPolicy.isNull()) |
| 85 context->parseAndSetReferrerPolicy(startupData->m_referrerPolicy); | 85 context->parseAndSetReferrerPolicy(startupData->m_referrerPolicy); |
| 86 context->setAddressSpace(startupData->m_addressSpace); | 86 context->setAddressSpace(startupData->m_addressSpace); |
| 87 OriginTrialContext::addTokens(context, | 87 OriginTrialContext::addTokens(context, |
| 88 startupData->m_originTrialTokens.get()); | 88 startupData->m_originTrialTokens.get()); |
| 89 | 89 |
| 90 return context; | 90 return context; |
| 91 } | 91 } |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(thread(), event); | 260 debugger->exceptionThrown(thread(), event); |
| 261 } | 261 } |
| 262 | 262 |
| 263 } // namespace blink | 263 } // namespace blink |
| OLD | NEW |