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