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