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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
387 // shut it down right here. | 387 // shut it down right here. |
388 delete this; | 388 delete this; |
389 return; | 389 return; |
390 } | 390 } |
391 | 391 |
392 Document* document = toWebLocalFrameImpl(m_mainFrame)->frame()->document(); | 392 Document* document = toWebLocalFrameImpl(m_mainFrame)->frame()->document(); |
393 WorkerThreadStartMode startMode = DontPauseWorkerGlobalScopeOnStart; | 393 WorkerThreadStartMode startMode = DontPauseWorkerGlobalScopeOnStart; |
394 if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(document)) | 394 if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(document)) |
395 startMode = PauseWorkerGlobalScopeOnStart; | 395 startMode = PauseWorkerGlobalScopeOnStart; |
396 | 396 |
397 SecurityOrigin::PolicyOverrides originPolicyOverrides; | |
398 if (document->securityOrigin()) | |
horo
2014/09/24 05:42:27
I think WebSharedWorkerImpl's m_mainFrame is not a
| |
399 originPolicyOverrides = document->securityOrigin()->policyOverrides(); | |
400 | |
397 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(); | 401 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(); |
398 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c reate()); | 402 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c reate()); |
399 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); | 403 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); |
400 providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->crea teWorkerPermissionClientProxy(webSecurityOrigin))); | 404 providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->crea teWorkerPermissionClientProxy(webSecurityOrigin))); |
401 OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = WorkerThreadStartu pData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->sc ript(), startMode, m_contentSecurityPolicy, static_cast<ContentSecurityPolicyHea derType>(m_policyType), workerClients.release()); | 405 OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = WorkerThreadStartu pData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->sc ript(), startMode, m_contentSecurityPolicy, static_cast<ContentSecurityPolicyHea derType>(m_policyType), originPolicyOverrides, workerClients.release()); |
402 setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData .release())); | 406 setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData .release())); |
403 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri ptLoader->identifier(), m_mainScriptLoader->script()); | 407 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri ptLoader->identifier(), m_mainScriptLoader->script()); |
404 m_mainScriptLoader.clear(); | 408 m_mainScriptLoader.clear(); |
405 | 409 |
406 workerThread()->start(); | 410 workerThread()->start(); |
407 m_workerInspectorProxy->workerThreadCreated(m_loadingDocument.get(), workerT hread(), m_url); | 411 m_workerInspectorProxy->workerThreadCreated(m_loadingDocument.get(), workerT hread(), m_url); |
408 if (client()) | 412 if (client()) |
409 client()->workerScriptLoaded(); | 413 client()->workerScriptLoaded(); |
410 } | 414 } |
411 | 415 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
457 if (devtoolsAgent) | 461 if (devtoolsAgent) |
458 devtoolsAgent->dispatchOnInspectorBackend(message); | 462 devtoolsAgent->dispatchOnInspectorBackend(message); |
459 } | 463 } |
460 | 464 |
461 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 465 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
462 { | 466 { |
463 return new WebSharedWorkerImpl(client); | 467 return new WebSharedWorkerImpl(client); |
464 } | 468 } |
465 | 469 |
466 } // namespace blink | 470 } // namespace blink |
OLD | NEW |