Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: Source/web/WebEmbeddedWorkerImpl.cpp

Issue 1041053005: Oilpan: fix WorkerThreadStartupData finalization handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add comment clarifying use of CrossThreadPersistent<> Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/Handle.h ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 409
410 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(); 410 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
411 provideContentSettingsClientToWorker(workerClients.get(), m_contentSettingsC lient.release()); 411 provideContentSettingsClientToWorker(workerClients.get(), m_contentSettingsC lient.release());
412 provideServiceWorkerGlobalScopeClientToWorker(workerClients.get(), ServiceWo rkerGlobalScopeClientImpl::create(*m_workerContextClient)); 412 provideServiceWorkerGlobalScopeClientToWorker(workerClients.get(), ServiceWo rkerGlobalScopeClientImpl::create(*m_workerContextClient));
413 provideServiceWorkerContainerClientToWorker(workerClients.get(), adoptPtr(m_ workerContextClient->createServiceWorkerProvider())); 413 provideServiceWorkerContainerClientToWorker(workerClients.get(), adoptPtr(m_ workerContextClient->createServiceWorkerProvider()));
414 414
415 // We need to set the CSP to both the shadow page's document and the Service WorkerGlobalScope. 415 // We need to set the CSP to both the shadow page's document and the Service WorkerGlobalScope.
416 document->initContentSecurityPolicy(m_mainScriptLoader->releaseContentSecuri tyPolicy()); 416 document->initContentSecurityPolicy(m_mainScriptLoader->releaseContentSecuri tyPolicy());
417 417
418 KURL scriptURL = m_mainScriptLoader->url(); 418 KURL scriptURL = m_mainScriptLoader->url();
419 OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = 419 OwnPtr<WorkerThreadStartupData> startupData =
420 WorkerThreadStartupData::create( 420 WorkerThreadStartupData::create(
421 scriptURL, 421 scriptURL,
422 m_workerStartData.userAgent, 422 m_workerStartData.userAgent,
423 m_mainScriptLoader->script(), 423 m_mainScriptLoader->script(),
424 m_mainScriptLoader->releaseCachedMetadata(), 424 m_mainScriptLoader->releaseCachedMetadata(),
425 startMode, 425 startMode,
426 document->contentSecurityPolicy()->deprecatedHeader(), 426 document->contentSecurityPolicy()->deprecatedHeader(),
427 document->contentSecurityPolicy()->deprecatedHeaderType(), 427 document->contentSecurityPolicy()->deprecatedHeaderType(),
428 starterOrigin, 428 starterOrigin,
429 workerClients.release(), 429 workerClients.release(),
430 static_cast<blink::V8CacheOptions>(m_workerStartData.v8CacheOptions) ); 430 static_cast<blink::V8CacheOptions>(m_workerStartData.v8CacheOptions) );
431 431
432 m_mainScriptLoader.clear(); 432 m_mainScriptLoader.clear();
433 433
434 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient); 434 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient);
435 m_loaderProxy = WorkerLoaderProxy::create(this); 435 m_loaderProxy = WorkerLoaderProxy::create(this);
436 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy, startupData.release()); 436 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy, startupData.release());
437 m_workerThread->start(); 437 m_workerThread->start();
438 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); 438 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL);
439 } 439 }
440 440
441 } // namespace blink 441 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/heap/Handle.h ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698