| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 ->postTask( | 267 ->postTask( |
| 268 BLINK_FROM_HERE, | 268 BLINK_FROM_HERE, |
| 269 crossThreadBind( | 269 crossThreadBind( |
| 270 &ExecutionContextTask::performTaskIfContextIsValid, | 270 &ExecutionContextTask::performTaskIfContextIsValid, |
| 271 WTF::passed(std::move(task)), | 271 WTF::passed(std::move(task)), |
| 272 wrapCrossThreadWeakPersistent(m_mainFrame->frame()->document()))); | 272 wrapCrossThreadWeakPersistent(m_mainFrame->frame()->document()))); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void WebEmbeddedWorkerImpl::postTaskToWorkerGlobalScope( | 275 void WebEmbeddedWorkerImpl::postTaskToWorkerGlobalScope( |
| 276 const WebTraceLocation& location, | 276 const WebTraceLocation& location, |
| 277 std::unique_ptr<ExecutionContextTask> task) { | 277 std::unique_ptr<WTF::CrossThreadClosure> task) { |
| 278 if (m_askedToTerminate || !m_workerThread) | 278 if (m_askedToTerminate || !m_workerThread) |
| 279 return; | 279 return; |
| 280 m_workerThread->postTask(location, std::move(task)); | 280 m_workerThread->postTask(location, std::move(task)); |
| 281 } | 281 } |
| 282 | 282 |
| 283 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() { | 283 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() { |
| 284 // Create 'shadow page', which is never displayed and is used mainly to | 284 // Create 'shadow page', which is never displayed and is used mainly to |
| 285 // provide a context for loading on the main thread. | 285 // provide a context for loading on the main thread. |
| 286 // | 286 // |
| 287 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader. | 287 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader. |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 *this, *document, *m_workerContextClient); | 475 *this, *document, *m_workerContextClient); |
| 476 m_loaderProxy = WorkerLoaderProxy::create(this); | 476 m_loaderProxy = WorkerLoaderProxy::create(this); |
| 477 m_workerThread = | 477 m_workerThread = |
| 478 ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalScopeProxy); | 478 ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalScopeProxy); |
| 479 m_workerThread->start(std::move(startupData)); | 479 m_workerThread->start(std::move(startupData)); |
| 480 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), | 480 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), |
| 481 scriptURL); | 481 scriptURL); |
| 482 } | 482 } |
| 483 | 483 |
| 484 } // namespace blink | 484 } // namespace blink |
| OLD | NEW |