| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 std::unique_ptr<WorkerSettings> workerSettings = | 395 std::unique_ptr<WorkerSettings> workerSettings = |
| 396 WTF::wrapUnique(new WorkerSettings(document->settings())); | 396 WTF::wrapUnique(new WorkerSettings(document->settings())); |
| 397 std::unique_ptr<WorkerThreadStartupData> startupData = | 397 std::unique_ptr<WorkerThreadStartupData> startupData = |
| 398 WorkerThreadStartupData::create( | 398 WorkerThreadStartupData::create( |
| 399 m_url, m_loadingDocument->userAgent(), m_mainScriptLoader->script(), | 399 m_url, m_loadingDocument->userAgent(), m_mainScriptLoader->script(), |
| 400 nullptr, startMode, | 400 nullptr, startMode, |
| 401 contentSecurityPolicy ? contentSecurityPolicy->headers().get() | 401 contentSecurityPolicy ? contentSecurityPolicy->headers().get() |
| 402 : nullptr, | 402 : nullptr, |
| 403 m_mainScriptLoader->getReferrerPolicy(), starterOrigin, workerClients, | 403 m_mainScriptLoader->getReferrerPolicy(), starterOrigin, workerClients, |
| 404 m_mainScriptLoader->responseAddressSpace(), | 404 m_mainScriptLoader->responseAddressSpace(), |
| 405 m_mainScriptLoader->originTrialTokens(), std::move(workerSettings)); | 405 m_mainScriptLoader->originTrialTokens(), std::move(workerSettings), |
| 406 WorkerV8Settings::Default()); |
| 406 | 407 |
| 407 // SharedWorker can sometimes run tasks that are initiated by/associated with | 408 // SharedWorker can sometimes run tasks that are initiated by/associated with |
| 408 // a document's frame but these documents can be from a different process. So | 409 // a document's frame but these documents can be from a different process. So |
| 409 // we intentionally populate the task runners with null document in order to | 410 // we intentionally populate the task runners with null document in order to |
| 410 // use the thread's default task runner. Note that |m_document| should not be | 411 // use the thread's default task runner. Note that |m_document| should not be |
| 411 // used as it's a dummy document for loading that doesn't represent the frame | 412 // used as it's a dummy document for loading that doesn't represent the frame |
| 412 // of any associated document. | 413 // of any associated document. |
| 413 m_parentFrameTaskRunners = ParentFrameTaskRunners::create(nullptr); | 414 m_parentFrameTaskRunners = ParentFrameTaskRunners::create(nullptr); |
| 414 | 415 |
| 415 m_loaderProxy = WorkerLoaderProxy::create(this); | 416 m_loaderProxy = WorkerLoaderProxy::create(this); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 if (devtoolsAgent) | 466 if (devtoolsAgent) |
| 466 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, | 467 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, |
| 467 message); | 468 message); |
| 468 } | 469 } |
| 469 | 470 |
| 470 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) { | 471 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) { |
| 471 return new WebSharedWorkerImpl(client); | 472 return new WebSharedWorkerImpl(client); |
| 472 } | 473 } |
| 473 | 474 |
| 474 } // namespace blink | 475 } // namespace blink |
| OLD | NEW |