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

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

Issue 191003010: Oilpan: move WorkerThreadStartupData to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | no next file » | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "core/inspector/WorkerInspectorController.h" 49 #include "core/inspector/WorkerInspectorController.h"
50 #include "core/loader/FrameLoadRequest.h" 50 #include "core/loader/FrameLoadRequest.h"
51 #include "core/loader/FrameLoader.h" 51 #include "core/loader/FrameLoader.h"
52 #include "core/page/Page.h" 52 #include "core/page/Page.h"
53 #include "core/workers/SharedWorkerGlobalScope.h" 53 #include "core/workers/SharedWorkerGlobalScope.h"
54 #include "core/workers/SharedWorkerThread.h" 54 #include "core/workers/SharedWorkerThread.h"
55 #include "core/workers/WorkerClients.h" 55 #include "core/workers/WorkerClients.h"
56 #include "core/workers/WorkerGlobalScope.h" 56 #include "core/workers/WorkerGlobalScope.h"
57 #include "core/workers/WorkerScriptLoader.h" 57 #include "core/workers/WorkerScriptLoader.h"
58 #include "core/workers/WorkerThreadStartupData.h" 58 #include "core/workers/WorkerThreadStartupData.h"
59 #include "heap/Handle.h"
59 #include "modules/webdatabase/DatabaseTask.h" 60 #include "modules/webdatabase/DatabaseTask.h"
60 #include "platform/network/ContentSecurityPolicyParsers.h" 61 #include "platform/network/ContentSecurityPolicyParsers.h"
61 #include "platform/network/ResourceResponse.h" 62 #include "platform/network/ResourceResponse.h"
62 #include "platform/weborigin/KURL.h" 63 #include "platform/weborigin/KURL.h"
63 #include "platform/weborigin/SecurityOrigin.h" 64 #include "platform/weborigin/SecurityOrigin.h"
64 #include "public/platform/WebFileError.h" 65 #include "public/platform/WebFileError.h"
65 #include "public/platform/WebMessagePortChannel.h" 66 #include "public/platform/WebMessagePortChannel.h"
66 #include "public/platform/WebString.h" 67 #include "public/platform/WebString.h"
67 #include "public/platform/WebURL.h" 68 #include "public/platform/WebURL.h"
68 #include "public/web/WebWorkerPermissionClientProxy.h" 69 #include "public/web/WebWorkerPermissionClientProxy.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 if (client()) 344 if (client())
344 client()->workerScriptLoadFailed(); 345 client()->workerScriptLoadFailed();
345 return; 346 return;
346 } 347 }
347 WorkerThreadStartMode startMode = m_pauseWorkerContextOnStart ? PauseWorkerG lobalScopeOnStart : DontPauseWorkerGlobalScopeOnStart; 348 WorkerThreadStartMode startMode = m_pauseWorkerContextOnStart ? PauseWorkerG lobalScopeOnStart : DontPauseWorkerGlobalScopeOnStart;
348 OwnPtr<WorkerClients> workerClients = WorkerClients::create(); 349 OwnPtr<WorkerClients> workerClients = WorkerClients::create();
349 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c reate()); 350 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c reate());
350 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::creat e()); 351 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::creat e());
351 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); 352 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin());
352 providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->crea teWorkerPermissionClientProxy(webSecurityOrigin))); 353 providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->crea teWorkerPermissionClientProxy(webSecurityOrigin)));
353 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat e(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), star tMode, m_contentSecurityPolicy, static_cast<WebCore::ContentSecurityPolicyHeader Type>(m_policyType), workerClients.release()); 354 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());
354 setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData .release())); 355 setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData .release()));
355 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri ptLoader->identifier(), m_mainScriptLoader->script()); 356 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri ptLoader->identifier(), m_mainScriptLoader->script());
356 m_mainScriptLoader.clear(); 357 m_mainScriptLoader.clear();
357 358
358 if (m_attachDevToolsOnStart) 359 if (m_attachDevToolsOnStart)
359 workerThread()->runLoop().postDebuggerTask(createCallbackTask(connectToW orkerContextInspectorTask, true)); 360 workerThread()->runLoop().postDebuggerTask(createCallbackTask(connectToW orkerContextInspectorTask, true));
360 361
361 workerThread()->start(); 362 workerThread()->start();
362 if (client()) 363 if (client())
363 client()->workerScriptLoaded(); 364 client()->workerScriptLoaded();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp ectorBackendTask, String(message))); 432 workerThread()->runLoop().postDebuggerTask(createCallbackTask(dispatchOnInsp ectorBackendTask, String(message)));
432 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); 433 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread());
433 } 434 }
434 435
435 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 436 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
436 { 437 {
437 return new WebSharedWorkerImpl(client); 438 return new WebSharedWorkerImpl(client);
438 } 439 }
439 440
440 } // namespace blink 441 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698