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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(document)) | 408 if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(document)) |
409 startMode = PauseWorkerGlobalScopeOnStart; | 409 startMode = PauseWorkerGlobalScopeOnStart; |
410 | 410 |
411 // FIXME: this document's origin is pristine and without any extra privilege
s. (crbug.com/254993) | 411 // FIXME: this document's origin is pristine and without any extra privilege
s. (crbug.com/254993) |
412 SecurityOrigin* starterOrigin = document->securityOrigin(); | 412 SecurityOrigin* starterOrigin = document->securityOrigin(); |
413 | 413 |
414 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(); | 414 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(); |
415 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c
reate()); | 415 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c
reate()); |
416 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); | 416 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); |
417 provideContentSettingsClientToWorker(workerClients.get(), adoptPtr(client()-
>createWorkerContentSettingsClientProxy(webSecurityOrigin))); | 417 provideContentSettingsClientToWorker(workerClients.get(), adoptPtr(client()-
>createWorkerContentSettingsClientProxy(webSecurityOrigin))); |
418 OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = WorkerThreadStartu
pData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->sc
ript(), nullptr, startMode, m_contentSecurityPolicy, static_cast<ContentSecurity
PolicyHeaderType>(m_policyType), starterOrigin, workerClients.release()); | 418 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat
e(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), null
ptr, startMode, m_contentSecurityPolicy, static_cast<ContentSecurityPolicyHeader
Type>(m_policyType), starterOrigin, workerClients.release()); |
419 m_loaderProxy = WorkerLoaderProxy::create(this); | 419 m_loaderProxy = WorkerLoaderProxy::create(this); |
420 setWorkerThread(SharedWorkerThread::create(m_name, m_loaderProxy, *this, sta
rtupData.release())); | 420 setWorkerThread(SharedWorkerThread::create(m_name, m_loaderProxy, *this, sta
rtupData.release())); |
421 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri
ptLoader->identifier(), m_mainScriptLoader->script()); | 421 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri
ptLoader->identifier(), m_mainScriptLoader->script()); |
422 m_mainScriptLoader.clear(); | 422 m_mainScriptLoader.clear(); |
423 | 423 |
424 workerThread()->start(); | 424 workerThread()->start(); |
425 m_workerInspectorProxy->workerThreadCreated(m_loadingDocument.get(), workerT
hread(), m_url); | 425 m_workerInspectorProxy->workerThreadCreated(m_loadingDocument.get(), workerT
hread(), m_url); |
426 if (client()) | 426 if (client()) |
427 client()->workerScriptLoaded(); | 427 client()->workerScriptLoaded(); |
428 } | 428 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 if (devtoolsAgent) | 472 if (devtoolsAgent) |
473 devtoolsAgent->dispatchOnInspectorBackend(message); | 473 devtoolsAgent->dispatchOnInspectorBackend(message); |
474 } | 474 } |
475 | 475 |
476 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 476 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
477 { | 477 { |
478 return new WebSharedWorkerImpl(client); | 478 return new WebSharedWorkerImpl(client); |
479 } | 479 } |
480 | 480 |
481 } // namespace blink | 481 } // namespace blink |
OLD | NEW |