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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 WorkerThreadStartMode startMode = | 372 WorkerThreadStartMode startMode = |
373 m_workerInspectorProxy->workerStartMode(document); | 373 m_workerInspectorProxy->workerStartMode(document); |
374 std::unique_ptr<WorkerSettings> workerSettings = | 374 std::unique_ptr<WorkerSettings> workerSettings = |
375 wrapUnique(new WorkerSettings(document->settings())); | 375 wrapUnique(new WorkerSettings(document->settings())); |
376 std::unique_ptr<WorkerThreadStartupData> startupData = | 376 std::unique_ptr<WorkerThreadStartupData> startupData = |
377 WorkerThreadStartupData::create( | 377 WorkerThreadStartupData::create( |
378 m_url, m_loadingDocument->userAgent(), m_mainScriptLoader->script(), | 378 m_url, m_loadingDocument->userAgent(), m_mainScriptLoader->script(), |
379 nullptr, startMode, | 379 nullptr, startMode, |
380 contentSecurityPolicy ? contentSecurityPolicy->headers().get() | 380 contentSecurityPolicy ? contentSecurityPolicy->headers().get() |
381 : nullptr, | 381 : nullptr, |
382 m_mainScriptLoader->referrerPolicy(), starterOrigin, workerClients, | 382 m_mainScriptLoader->getReferrerPolicy(), starterOrigin, workerClients, |
383 m_mainScriptLoader->responseAddressSpace(), | 383 m_mainScriptLoader->responseAddressSpace(), |
384 m_mainScriptLoader->originTrialTokens(), std::move(workerSettings)); | 384 m_mainScriptLoader->originTrialTokens(), std::move(workerSettings)); |
385 | 385 |
386 // SharedWorker can sometimes run tasks that are initiated by/associated with | 386 // SharedWorker can sometimes run tasks that are initiated by/associated with |
387 // a document's frame but these documents can be from a different process. So | 387 // a document's frame but these documents can be from a different process. So |
388 // we intentionally populate the task runners with null document in order to | 388 // we intentionally populate the task runners with null document in order to |
389 // use the thread's default task runner. Note that |m_document| should not be | 389 // use the thread's default task runner. Note that |m_document| should not be |
390 // used as it's a dummy document for loading that doesn't represent the frame | 390 // used as it's a dummy document for loading that doesn't represent the frame |
391 // of any associated document. | 391 // of any associated document. |
392 m_parentFrameTaskRunners = ParentFrameTaskRunners::create(nullptr); | 392 m_parentFrameTaskRunners = ParentFrameTaskRunners::create(nullptr); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 if (devtoolsAgent) | 444 if (devtoolsAgent) |
445 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, | 445 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, |
446 message); | 446 message); |
447 } | 447 } |
448 | 448 |
449 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) { | 449 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) { |
450 return new WebSharedWorkerImpl(client); | 450 return new WebSharedWorkerImpl(client); |
451 } | 451 } |
452 | 452 |
453 } // namespace blink | 453 } // namespace blink |
OLD | NEW |