OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 { | 312 { |
313 if (!contentSecurityPolicy()) { | 313 if (!contentSecurityPolicy()) { |
314 ContentSecurityPolicy* csp = ContentSecurityPolicy::create(); | 314 ContentSecurityPolicy* csp = ContentSecurityPolicy::create(); |
315 setContentSecurityPolicy(csp); | 315 setContentSecurityPolicy(csp); |
316 } | 316 } |
317 for (const auto& policyAndType : headers) | 317 for (const auto& policyAndType : headers) |
318 contentSecurityPolicy()->didReceiveHeader(policyAndType.first, policyAnd
Type.second, ContentSecurityPolicyHeaderSourceHTTP); | 318 contentSecurityPolicy()->didReceiveHeader(policyAndType.first, policyAnd
Type.second, ContentSecurityPolicyHeaderSourceHTTP); |
319 contentSecurityPolicy()->bindToExecutionContext(getExecutionContext()); | 319 contentSecurityPolicy()->bindToExecutionContext(getExecutionContext()); |
320 } | 320 } |
321 | 321 |
| 322 void WorkerGlobalScope::setWorkerSettings(std::unique_ptr<WorkerSettings> worker
Settings) |
| 323 { |
| 324 m_workerSettings = std::move(workerSettings); |
| 325 } |
| 326 |
322 void WorkerGlobalScope::addMessageToWorkerConsole(ConsoleMessage* consoleMessage
) | 327 void WorkerGlobalScope::addMessageToWorkerConsole(ConsoleMessage* consoleMessage
) |
323 { | 328 { |
324 DCHECK(isContextThread()); | 329 DCHECK(isContextThread()); |
325 m_consoleMessageStorage->addConsoleMessage(this, consoleMessage); | 330 m_consoleMessageStorage->addConsoleMessage(this, consoleMessage); |
326 } | 331 } |
327 | 332 |
328 void WorkerGlobalScope::exceptionThrown(const String& errorMessage, std::unique_
ptr<SourceLocation> location) | 333 void WorkerGlobalScope::exceptionThrown(const String& errorMessage, std::unique_
ptr<SourceLocation> location) |
329 { | 334 { |
330 thread()->workerReportingProxy().reportException(errorMessage, std::move(loc
ation)); | 335 thread()->workerReportingProxy().reportException(errorMessage, std::move(loc
ation)); |
331 } | 336 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 visitor->trace(m_timers); | 371 visitor->trace(m_timers); |
367 visitor->trace(m_consoleMessageStorage); | 372 visitor->trace(m_consoleMessageStorage); |
368 visitor->trace(m_eventListeners); | 373 visitor->trace(m_eventListeners); |
369 ExecutionContext::trace(visitor); | 374 ExecutionContext::trace(visitor); |
370 EventTargetWithInlineData::trace(visitor); | 375 EventTargetWithInlineData::trace(visitor); |
371 SecurityContext::trace(visitor); | 376 SecurityContext::trace(visitor); |
372 Supplementable<WorkerGlobalScope>::trace(visitor); | 377 Supplementable<WorkerGlobalScope>::trace(visitor); |
373 } | 378 } |
374 | 379 |
375 } // namespace blink | 380 } // namespace blink |
OLD | NEW |