| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 starterOrigin, | 353 starterOrigin, |
| 354 workerClients, | 354 workerClients, |
| 355 m_mainScriptLoader->responseAddressSpace(), | 355 m_mainScriptLoader->responseAddressSpace(), |
| 356 m_mainScriptLoader->originTrialTokens(), | 356 m_mainScriptLoader->originTrialTokens(), |
| 357 std::move(workerSettings)); | 357 std::move(workerSettings)); |
| 358 | 358 |
| 359 // We have a dummy document here for loading but it doesn't really represent | 359 // We have a dummy document here for loading but it doesn't really represent |
| 360 // the document/frame of associated document(s) for this worker. Here we | 360 // the document/frame of associated document(s) for this worker. Here we |
| 361 // populate the task runners with null document not to confuse the frame | 361 // populate the task runners with null document not to confuse the frame |
| 362 // scheduler (which will end up using the thread's default task runner). | 362 // scheduler (which will end up using the thread's default task runner). |
| 363 m_mainThreadTaskRunners = new ParentFrameTaskRunners(nullptr); | 363 m_mainThreadTaskRunners = ParentFrameTaskRunners::create(nullptr); |
| 364 | 364 |
| 365 m_loaderProxy = WorkerLoaderProxy::create(this); | 365 m_loaderProxy = WorkerLoaderProxy::create(this); |
| 366 m_workerThread = SharedWorkerThread::create(m_name, m_loaderProxy, *this); | 366 m_workerThread = SharedWorkerThread::create(m_name, m_loaderProxy, *this); |
| 367 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri
ptLoader->identifier(), m_mainScriptLoader->script()); | 367 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri
ptLoader->identifier(), m_mainScriptLoader->script()); |
| 368 m_mainScriptLoader.clear(); | 368 m_mainScriptLoader.clear(); |
| 369 | 369 |
| 370 workerThread()->start(std::move(startupData)); | 370 workerThread()->start(std::move(startupData)); |
| 371 m_workerInspectorProxy->workerThreadCreated(toDocument(m_loadingDocument.get
()), workerThread(), m_url); | 371 m_workerInspectorProxy->workerThreadCreated(toDocument(m_loadingDocument.get
()), workerThread(), m_url); |
| 372 m_client->workerScriptLoaded(); | 372 m_client->workerScriptLoaded(); |
| 373 } | 373 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 if (devtoolsAgent) | 412 if (devtoolsAgent) |
| 413 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes
sage); | 413 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes
sage); |
| 414 } | 414 } |
| 415 | 415 |
| 416 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 416 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 417 { | 417 { |
| 418 return new WebSharedWorkerImpl(client); | 418 return new WebSharedWorkerImpl(client); |
| 419 } | 419 } |
| 420 | 420 |
| 421 } // namespace blink | 421 } // namespace blink |
| OLD | NEW |