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

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

Issue 230083003: Oilpan: Move WorkerClients to the managed heap and trace its supplements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: CR comments and unbreak the non-oilpan build Created 6 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/web/ServiceWorkerGlobalScopeClientImpl.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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 240 }
241 241
242 WorkerThreadStartMode startMode = 242 WorkerThreadStartMode startMode =
243 (m_workerStartData.startMode == WebEmbeddedWorkerStartModePauseOnStart) 243 (m_workerStartData.startMode == WebEmbeddedWorkerStartModePauseOnStart)
244 ? PauseWorkerGlobalScopeOnStart : DontPauseWorkerGlobalScopeOnStart; 244 ? PauseWorkerGlobalScopeOnStart : DontPauseWorkerGlobalScopeOnStart;
245 245
246 // This is to be owned by ServiceWorker's WorkerGlobalScope, and is 246 // This is to be owned by ServiceWorker's WorkerGlobalScope, and is
247 // guaranteed to be around while the WorkerGlobalScope is alive. 247 // guaranteed to be around while the WorkerGlobalScope is alive.
248 WebServiceWorkerContextClient* contextClient = m_workerContextClient.get(); 248 WebServiceWorkerContextClient* contextClient = m_workerContextClient.get();
249 249
250 OwnPtr<WorkerClients> workerClients = WorkerClients::create(); 250 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
251 providePermissionClientToWorker(workerClients.get(), m_permissionClient.rele ase()); 251 providePermissionClientToWorker(workerClients.get(), m_permissionClient.rele ase());
252 provideServiceWorkerGlobalScopeClientToWorker(workerClients.get(), ServiceWo rkerGlobalScopeClientImpl::create(m_workerContextClient.release())); 252 provideServiceWorkerGlobalScopeClientToWorker(workerClients.get(), ServiceWo rkerGlobalScopeClientImpl::create(m_workerContextClient.release()));
253 253
254 OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = 254 OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData =
255 WorkerThreadStartupData::create( 255 WorkerThreadStartupData::create(
256 m_mainScriptLoader->url(), 256 m_mainScriptLoader->url(),
257 m_workerStartData.userAgent, 257 m_workerStartData.userAgent,
258 m_mainScriptLoader->script(), 258 m_mainScriptLoader->script(),
259 startMode, 259 startMode,
260 // FIXME: fill appropriate CSP info and policy type. 260 // FIXME: fill appropriate CSP info and policy type.
261 String(), 261 String(),
262 ContentSecurityPolicyHeaderTypeEnforce, 262 ContentSecurityPolicyHeaderTypeEnforce,
263 workerClients.release()); 263 workerClients.release());
264 264
265 m_mainScriptLoader.clear(); 265 m_mainScriptLoader.clear();
266 266
267 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *toW ebFrameImpl(m_mainFrame)->frame()->document(), *contextClient); 267 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *toW ebFrameImpl(m_mainFrame)->frame()->document(), *contextClient);
268 m_loaderProxy = LoaderProxy::create(*this); 268 m_loaderProxy = LoaderProxy::create(*this);
269 269
270 m_workerThread = ServiceWorkerThread::create(*m_loaderProxy, *m_workerGlobal ScopeProxy, startupData.release()); 270 m_workerThread = ServiceWorkerThread::create(*m_loaderProxy, *m_workerGlobal ScopeProxy, startupData.release());
271 m_workerThread->start(); 271 m_workerThread->start();
272 } 272 }
273 273
274 } // namespace blink 274 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeClientImpl.h ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698