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

Side by Side Diff: Source/web/WebSharedWorkerImpl.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/WebEmbeddedWorkerImpl.cpp ('k') | Source/web/WorkerGlobalScopeProxyProviderImpl.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) 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 { 340 {
341 ASSERT(m_loadingDocument); 341 ASSERT(m_loadingDocument);
342 ASSERT(m_mainScriptLoader); 342 ASSERT(m_mainScriptLoader);
343 if (m_mainScriptLoader->failed() || m_askedToTerminate) { 343 if (m_mainScriptLoader->failed() || m_askedToTerminate) {
344 m_mainScriptLoader.clear(); 344 m_mainScriptLoader.clear();
345 if (client()) 345 if (client())
346 client()->workerScriptLoadFailed(); 346 client()->workerScriptLoadFailed();
347 return; 347 return;
348 } 348 }
349 WorkerThreadStartMode startMode = m_pauseWorkerContextOnStart ? PauseWorkerG lobalScopeOnStart : DontPauseWorkerGlobalScopeOnStart; 349 WorkerThreadStartMode startMode = m_pauseWorkerContextOnStart ? PauseWorkerG lobalScopeOnStart : DontPauseWorkerGlobalScopeOnStart;
350 OwnPtr<WorkerClients> workerClients = WorkerClients::create(); 350 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
351 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c reate()); 351 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c reate());
352 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::creat e()); 352 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::creat e());
353 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); 353 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin());
354 providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->crea teWorkerPermissionClientProxy(webSecurityOrigin))); 354 providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->crea teWorkerPermissionClientProxy(webSecurityOrigin)));
355 OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = WorkerThreadStartu pData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->sc ript(), startMode, m_contentSecurityPolicy, static_cast<WebCore::ContentSecurity PolicyHeaderType>(m_policyType), workerClients.release()); 355 OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = WorkerThreadStartu pData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->sc ript(), startMode, m_contentSecurityPolicy, static_cast<WebCore::ContentSecurity PolicyHeaderType>(m_policyType), workerClients.release());
356 setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData .release())); 356 setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData .release()));
357 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri ptLoader->identifier(), m_mainScriptLoader->script()); 357 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri ptLoader->identifier(), m_mainScriptLoader->script());
358 m_mainScriptLoader.clear(); 358 m_mainScriptLoader.clear();
359 359
360 if (m_attachDevToolsOnStart) 360 if (m_attachDevToolsOnStart)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp ectorBackendTask, String(message))); 433 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp ectorBackendTask, String(message)));
434 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); 434 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread());
435 } 435 }
436 436
437 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 437 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
438 { 438 {
439 return new WebSharedWorkerImpl(client); 439 return new WebSharedWorkerImpl(client);
440 } 440 }
441 441
442 } // namespace blink 442 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | Source/web/WorkerGlobalScopeProxyProviderImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698