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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 466 |
467 // We have a dummy document here for loading but it doesn't really represent | 467 // We have a dummy document here for loading but it doesn't really represent |
468 // the document/frame of associated document(s) for this worker. Here we | 468 // the document/frame of associated document(s) for this worker. Here we |
469 // populate the task runners with null document not to confuse the frame | 469 // populate the task runners with null document not to confuse the frame |
470 // scheduler (which will end up using the thread's default task runner). | 470 // scheduler (which will end up using the thread's default task runner). |
471 m_mainThreadTaskRunners = ParentFrameTaskRunners::create(nullptr); | 471 m_mainThreadTaskRunners = ParentFrameTaskRunners::create(nullptr); |
472 | 472 |
473 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create( | 473 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create( |
474 *this, *document, *m_workerContextClient); | 474 *this, *document, *m_workerContextClient); |
475 m_loaderProxy = WorkerLoaderProxy::create(this); | 475 m_loaderProxy = WorkerLoaderProxy::create(this); |
476 m_workerThread = ServiceWorkerThread::create( | 476 m_workerThread = |
477 m_loaderProxy, *m_workerGlobalScopeProxy, m_mainThreadTaskRunners.get()); | 477 ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalScopeProxy); |
478 m_workerThread->start(std::move(startupData)); | 478 m_workerThread->start(std::move(startupData), m_mainThreadTaskRunners.get()); |
479 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), | 479 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), |
480 scriptURL); | 480 scriptURL); |
481 } | 481 } |
482 | 482 |
483 } // namespace blink | 483 } // namespace blink |
OLD | NEW |