| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 WTF::WrapUnique(client_->CreateWorkerContentSettingsClientProxy( | 326 WTF::WrapUnique(client_->CreateWorkerContentSettingsClientProxy( |
| 327 web_security_origin))); | 327 web_security_origin))); |
| 328 ProvideIndexedDBClientToWorker(worker_clients, | 328 ProvideIndexedDBClientToWorker(worker_clients, |
| 329 IndexedDBClientImpl::Create(*worker_clients)); | 329 IndexedDBClientImpl::Create(*worker_clients)); |
| 330 ContentSecurityPolicy* content_security_policy = | 330 ContentSecurityPolicy* content_security_policy = |
| 331 main_script_loader_->ReleaseContentSecurityPolicy(); | 331 main_script_loader_->ReleaseContentSecurityPolicy(); |
| 332 WorkerThreadStartMode start_mode = | 332 WorkerThreadStartMode start_mode = |
| 333 worker_inspector_proxy_->WorkerStartMode(document); | 333 worker_inspector_proxy_->WorkerStartMode(document); |
| 334 std::unique_ptr<WorkerSettings> worker_settings = | 334 std::unique_ptr<WorkerSettings> worker_settings = |
| 335 WTF::WrapUnique(new WorkerSettings(document->GetSettings())); | 335 WTF::WrapUnique(new WorkerSettings(document->GetSettings())); |
| 336 WorkerV8Settings worker_v8_settings = WorkerV8Settings::Default(); |
| 337 worker_v8_settings.atomics_wait_mode_ = |
| 338 WorkerV8Settings::AtomicsWaitMode::kAllow; |
| 336 std::unique_ptr<WorkerThreadStartupData> startup_data = | 339 std::unique_ptr<WorkerThreadStartupData> startup_data = |
| 337 WorkerThreadStartupData::Create( | 340 WorkerThreadStartupData::Create( |
| 338 url_, loading_document_->UserAgent(), | 341 url_, loading_document_->UserAgent(), |
| 339 main_script_loader_->SourceText(), nullptr, start_mode, | 342 main_script_loader_->SourceText(), nullptr, start_mode, |
| 340 content_security_policy ? content_security_policy->Headers().get() | 343 content_security_policy ? content_security_policy->Headers().get() |
| 341 : nullptr, | 344 : nullptr, |
| 342 main_script_loader_->GetReferrerPolicy(), starter_origin, | 345 main_script_loader_->GetReferrerPolicy(), starter_origin, |
| 343 worker_clients, main_script_loader_->ResponseAddressSpace(), | 346 worker_clients, main_script_loader_->ResponseAddressSpace(), |
| 344 main_script_loader_->OriginTrialTokens(), std::move(worker_settings), | 347 main_script_loader_->OriginTrialTokens(), std::move(worker_settings), |
| 345 WorkerV8Settings::Default()); | 348 worker_v8_settings); |
| 346 | 349 |
| 347 // SharedWorker can sometimes run tasks that are initiated by/associated with | 350 // SharedWorker can sometimes run tasks that are initiated by/associated with |
| 348 // a document's frame but these documents can be from a different process. So | 351 // a document's frame but these documents can be from a different process. So |
| 349 // we intentionally populate the task runners with null document in order to | 352 // we intentionally populate the task runners with null document in order to |
| 350 // use the thread's default task runner. Note that |m_document| should not be | 353 // use the thread's default task runner. Note that |m_document| should not be |
| 351 // used as it's a dummy document for loading that doesn't represent the frame | 354 // used as it's a dummy document for loading that doesn't represent the frame |
| 352 // of any associated document. | 355 // of any associated document. |
| 353 ParentFrameTaskRunners* task_runners = | 356 ParentFrameTaskRunners* task_runners = |
| 354 ParentFrameTaskRunners::Create(nullptr); | 357 ParentFrameTaskRunners::Create(nullptr); |
| 355 | 358 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 if (devtools_agent) | 411 if (devtools_agent) |
| 409 devtools_agent->DispatchOnInspectorBackend(session_id, call_id, method, | 412 devtools_agent->DispatchOnInspectorBackend(session_id, call_id, method, |
| 410 message); | 413 message); |
| 411 } | 414 } |
| 412 | 415 |
| 413 WebSharedWorker* WebSharedWorker::Create(WebSharedWorkerClient* client) { | 416 WebSharedWorker* WebSharedWorker::Create(WebSharedWorkerClient* client) { |
| 414 return new WebSharedWorkerImpl(client); | 417 return new WebSharedWorkerImpl(client); |
| 415 } | 418 } |
| 416 | 419 |
| 417 } // namespace blink | 420 } // namespace blink |
| OLD | NEW |