diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-18 20:37:15 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-18 20:37:15 +0000 |
commit | 1ff642971f66d5ab94857e5aa475ed63be2a0ea8 (patch) | |
tree | f59fac12d23c13792d9ddbe4459efebd37ce9dd4 | |
parent | 841ce9e359de4f04a8838e9be17b0a383613a96b (diff) | |
download | chromium_src-1ff642971f66d5ab94857e5aa475ed63be2a0ea8.zip chromium_src-1ff642971f66d5ab94857e5aa475ed63be2a0ea8.tar.gz chromium_src-1ff642971f66d5ab94857e5aa475ed63be2a0ea8.tar.bz2 |
reland of http://crrev.com/212230 Create top-level separate targets for...
Original CL here: https://codereview.chromium.org/17619005/
Changed since previous landing is diff between ps1 and ps2.
Diff since previous landing is a bit noisy, but in those files
against original is relatively small. The conditions for the
defines were incorrect and are simpler (and correct) now.
Previously:
Create top-level separate targets for browser and child dlls
The general idea is that there's top level targets chrome and chrome_child,
and corresponding content_app and content_app_child that depend on only
the subtargets that should be included in the appropriate dll.
Currently (probably) Windows-only and requires setting chrome_multiple_dll=1
for gyp.
Links, but Blink is still included in browser.
Single-process mode is currently disabled when chrome_multiple_dll is set.
Current graph is at:
http://commondatastorage.googleapis.com/chromelinkgraph/deps.html generated by
"python tools\win\split_link\graph_dependencies.py deps.html"
Remove the previous hacky-er attempt at this that was named "split dll".
TBR=jam@chromium.org
BUG=237249, 256965
Review URL: https://codereview.chromium.org/19572013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212415 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/debug/trace_event.h | 12 | ||||
-rw-r--r-- | base/debug/trace_event_impl.cc | 6 | ||||
-rw-r--r-- | base/debug/trace_event_unittest.cc | 3 | ||||
-rw-r--r-- | build/common.gypi | 13 | ||||
-rw-r--r-- | chrome/app/chrome_main_delegate.cc | 39 | ||||
-rw-r--r-- | chrome/app/client_util.cc | 20 | ||||
-rw-r--r-- | chrome/chrome.gyp | 5 | ||||
-rw-r--r-- | chrome/chrome_common.gypi | 1 | ||||
-rw-r--r-- | chrome/chrome_dll.gypi | 57 | ||||
-rw-r--r-- | chrome/chrome_syzygy.gyp | 2 | ||||
-rw-r--r-- | chrome/installer/mini_installer_syzygy.gyp | 2 | ||||
-rw-r--r-- | chrome/split_dll_fake_entry.cc | 40 | ||||
-rw-r--r-- | components/autofill.gypi | 2 | ||||
-rw-r--r-- | content/app/content_main_runner.cc | 12 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.cc | 10 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.h | 2 | ||||
-rw-r--r-- | content/content.gyp | 40 | ||||
-rw-r--r-- | content/content_common.gypi | 2 | ||||
-rw-r--r-- | content/content_tests.gypi | 1 | ||||
-rw-r--r-- | content/public/app/content_main_delegate.cc | 10 | ||||
-rw-r--r-- | ui/keyboard/keyboard.gyp | 2 | ||||
-rw-r--r-- | ui/views/views.gyp | 2 | ||||
-rw-r--r-- | webkit/glue/webkitplatformsupport_impl.cc | 3 |
23 files changed, 144 insertions, 142 deletions
diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h index 619b0ab..c17c008 100644 --- a/base/debug/trace_event.h +++ b/base/debug/trace_event.h @@ -788,8 +788,6 @@ // Defines visibility for classes in trace_event.h #define TRACE_EVENT_API_CLASS_EXPORT BASE_EXPORT -// Not supported in split-dll build. http://crbug.com/256965 -#if !defined(CHROME_SPLIT_DLL) // The thread buckets for the sampling profiler. TRACE_EVENT_API_CLASS_EXPORT extern \ TRACE_EVENT_API_ATOMIC_WORD g_trace_state[3]; @@ -797,8 +795,6 @@ TRACE_EVENT_API_CLASS_EXPORT extern \ #define TRACE_EVENT_API_THREAD_BUCKET(thread_bucket) \ g_trace_state[thread_bucket] -#endif - //////////////////////////////////////////////////////////////////////////////// // Implementation detail: trace event macros create temporary variables @@ -1489,23 +1485,15 @@ class TraceEventSamplingStateScope { } static inline const char* Current() { -// Not supported in split-dll build. http://crbug.com/256965 -#if !defined(CHROME_SPLIT_DLL) return reinterpret_cast<const char*>(TRACE_EVENT_API_ATOMIC_LOAD( g_trace_state[BucketNumber])); -#else - return NULL; -#endif } static inline void Set(const char* category_and_name) { -// Not supported in split-dll build. http://crbug.com/256965 -#if !defined(CHROME_SPLIT_DLL) TRACE_EVENT_API_ATOMIC_STORE( g_trace_state[BucketNumber], reinterpret_cast<TRACE_EVENT_API_ATOMIC_WORD>( const_cast<char*>(category_and_name))); -#endif } private: diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc index 4d637cd..e061ea1 100644 --- a/base/debug/trace_event_impl.cc +++ b/base/debug/trace_event_impl.cc @@ -42,11 +42,8 @@ class DeleteTraceLogForTesting { } }; -// Not supported in split-dll build. http://crbug.com/237249 -#if !defined(CHROME_SPLIT_DLL) // The thread buckets for the sampling profiler. BASE_EXPORT TRACE_EVENT_API_ATOMIC_WORD g_trace_state[3]; -#endif namespace base { namespace debug { @@ -981,8 +978,6 @@ void TraceLog::SetEnabled(const CategoryFilter& category_filter, category_filter_ = CategoryFilter(category_filter); EnableIncludedCategoryGroups(); - // Not supported in split-dll build. http://crbug.com/237249 - #if !defined(CHROME_SPLIT_DLL) if (options & ENABLE_SAMPLING) { sampling_thread_.reset(new TraceSamplingThread); sampling_thread_->RegisterSampleBucket( @@ -1002,7 +997,6 @@ void TraceLog::SetEnabled(const CategoryFilter& category_filter, DCHECK(false) << "failed to create thread"; } } - #endif dispatching_to_observer_list_ = true; observer_list = enabled_state_observer_list_; diff --git a/base/debug/trace_event_unittest.cc b/base/debug/trace_event_unittest.cc index ff0ab63..348c1d0 100644 --- a/base/debug/trace_event_unittest.cc +++ b/base/debug/trace_event_unittest.cc @@ -1677,8 +1677,6 @@ TEST_F(TraceEventTestFixture, TraceOptionsParsing) { "record-continuously,enable-sampling")); } -// Not supported in split dll build. http://crbug.com/256965 -#if !defined(CHROME_SPLIT_DLL) TEST_F(TraceEventTestFixture, TraceSampling) { event_watch_notification_ = 0; TraceLog::GetInstance()->SetEnabled( @@ -1738,7 +1736,6 @@ TEST_F(TraceEventTestFixture, TraceSamplingScope) { EndTraceAndFlush(); } -#endif // !CHROME_SPLIT_DLL class MyData : public base::debug::ConvertableToTraceFormat { public: diff --git a/build/common.gypi b/build/common.gypi index 3cbeee2..7898356 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -938,9 +938,9 @@ # to get incremental linking to be faster in debug builds. 'incremental_chrome_dll%': '0', - # Experimental setting to break chrome.dll in to multiple parts (currently - # two, split primarily along browser/render lines). - 'chrome_split_dll%': '0', + # Experimental setting to break chrome.dll into multiple pieces based on + # process type. + 'chrome_multiple_dll%': '0', # The default settings for third party code for treating # warnings-as-errors. Ideally, this would not be required, however there @@ -1868,11 +1868,8 @@ '<(DEPTH)/base/allocator/allocator.gyp:type_profiler', ], }], - ['chrome_split_dll', { - 'variables': { - 'chrome_split_dll': '<!(python <(DEPTH)/tools/win/split_link/check_installed.py)', - }, - 'defines': ['CHROME_SPLIT_DLL'], + ['chrome_multiple_dll', { + 'defines': ['CHROME_MULTIPLE_DLL'], }], ['OS=="linux" and clang==1 and host_arch=="ia32"', { # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed. diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index c8d224b..ab692b6 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc @@ -93,14 +93,19 @@ #include "chrome/app/breakpad_linux.h" #endif +#if !defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_BROWSER) base::LazyInstance<chrome::ChromeContentBrowserClient> g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER; +#endif + +#if !defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_CHILD) base::LazyInstance<chrome::ChromeContentRendererClient> g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; base::LazyInstance<chrome::ChromeContentUtilityClient> g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; base::LazyInstance<chrome::ChromeContentPluginClient> g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; +#endif // !CHROME_MULTIPLE_DLL || CHROME_MULTIPLE_DLL_CHILD #if defined(OS_POSIX) base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky @@ -388,7 +393,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) { // not though: it still uses string16. As there is no easily accessible command // line on Android, I'm not sure this is a big deal, at least for purposes of // troubleshooting with a customer. -#if !defined(OS_ANDROID) +#if !defined(OS_ANDROID) && !defined(CHROME_MULTIPLE_DLL_CHILD) // If we are in diagnostics mode this is the end of the line: after the // diagnostics are run the process will invariably exit. if (command_line.HasSwitch(switches::kDiagnostics)) { @@ -673,15 +678,17 @@ int ChromeMainDelegate::RunProcess( const content::MainFunctionParams& main_function_params) { // ANDROID doesn't support "service", so no ServiceProcessMain, and arraysize // doesn't support empty array. So we comment out the block for Android. -#if !defined(OS_ANDROID) +#if !defined(OS_ANDROID) && \ + (!defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_BROWSER)) static const MainFunction kMainFunctions[] = { { switches::kServiceProcess, ServiceProcessMain }, #if defined(OS_MACOSX) { switches::kRelauncherProcess, mac_relauncher::internal::RelauncherMain }, #endif - // TODO(scottmg): http://crbug.com/237249 NaCl -> child. -#if !defined(DISABLE_NACL) + +#if !defined(DISABLE_NACL) && \ + (!defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_CHILD)) { switches::kNaClLoaderProcess, NaClMain }, #endif // DISABLE_NACL }; @@ -750,22 +757,36 @@ void ChromeMainDelegate::ZygoteForked() { #endif // OS_MACOSX content::ContentBrowserClient* - ChromeMainDelegate::CreateContentBrowserClient() { +ChromeMainDelegate::CreateContentBrowserClient() { +#if defined(CHROME_MULTIPLE_DLL_CHILD) + return NULL; +#else return &g_chrome_content_browser_client.Get(); +#endif } content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() { - // TODO(scottmg): http://crbug.com/237249 This will have to be split out into - // browser and child parts. +#if defined(CHROME_MULTIPLE_DLL_BROWSER) + return NULL; +#else return &g_chrome_content_plugin_client.Get(); +#endif } content::ContentRendererClient* - ChromeMainDelegate::CreateContentRendererClient() { +ChromeMainDelegate::CreateContentRendererClient() { +#if defined(CHROME_MULTIPLE_DLL_BROWSER) + return NULL; +#else return &g_chrome_content_renderer_client.Get(); +#endif } content::ContentUtilityClient* - ChromeMainDelegate::CreateContentUtilityClient() { +ChromeMainDelegate::CreateContentUtilityClient() { +#if defined(CHROME_MULTIPLE_DLL_BROWSER) + return NULL; +#else return &g_chrome_content_utility_client.Get(); +#endif } diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc index 0352e24..70252ea 100644 --- a/chrome/app/client_util.cc +++ b/chrome/app/client_util.cc @@ -74,18 +74,6 @@ void ClearDidRun(const string16& dll_path) { GoogleUpdateSettings::UpdateDidRunState(false, system_level); } -#if defined(CHROME_SPLIT_DLL) -// Deferred initialization entry point for chrome1.dll. -typedef BOOL (__stdcall *DoDeferredCrtInitFunc)(HINSTANCE hinstance); - -bool InitSplitChromeDll(HMODULE mod) { - if (!mod) - return false; - DoDeferredCrtInitFunc init = reinterpret_cast<DoDeferredCrtInitFunc>( - ::GetProcAddress(mod, "_DoDeferredCrtInit@4")); - return (init(mod) == TRUE); -} -#endif } // namespace string16 GetExecutablePath() { @@ -166,14 +154,6 @@ HMODULE MainDllLoader::Load(string16* out_version, string16* out_file) { DCHECK(dll); -#if defined(CHROME_SPLIT_DLL) - // In split dlls mode, we need to manually initialize both DLLs because - // the circular dependencies between them make the loader not call the - // Dllmain for DLL_PROCESS_ATTACH. - InitSplitChromeDll(dll); - InitSplitChromeDll(::GetModuleHandleA("chrome1.dll")); -#endif - return dll; } diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 1684d99..a5db908 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -18,7 +18,6 @@ ], 'chromium_child_dependencies': [ 'common', - '../content/content.gyp:content_app', '../sync/sync.gyp:sync', ], 'allocator_target': '../base/allocator/allocator.gyp:allocator', @@ -30,9 +29,8 @@ 'conditions': [ ['OS!="ios"', { 'chromium_browser_dependencies': [ - 'debugger', - '../content/content.gyp:content_ppapi_plugin', '../printing/printing.gyp:printing', + '../ppapi/ppapi_internal.gyp:ppapi_host', ], 'chromium_child_dependencies': [ 'debugger', @@ -42,7 +40,6 @@ '../content/content.gyp:content_gpu', '../content/content.gyp:content_ppapi_plugin', '../content/content.gyp:content_worker', - '../printing/printing.gyp:printing', '../third_party/WebKit/Source/devtools/devtools.gyp:devtools_frontend_resources', ], }], diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index 169d04a..8c88226 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -488,6 +488,7 @@ 'common/extensions/api/extension_api_stub.cc', ], 'dependencies': [ + '../device/bluetooth/bluetooth.gyp:device_bluetooth', '../device/usb/usb.gyp:device_usb', ], }, { # enable_extensions == 0 diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi index 7481dfd..c1bbe71 100644 --- a/chrome/chrome_dll.gypi +++ b/chrome/chrome_dll.gypi @@ -21,6 +21,11 @@ ], }, }], # OS=="mac" + ['chrome_multiple_dll==1', { + 'dependencies': [ + 'chrome_child_dll', + ], + }], ['incremental_chrome_dll==1', { # Linking to a different directory and then hardlinking back # to OutDir is a workaround to avoid having the .ilk for @@ -75,8 +80,6 @@ }, 'dependencies': [ '<@(chromium_browser_dependencies)', - '<@(chromium_child_dependencies)', - '../content/content.gyp:content_worker', 'app/policy/cloud_policy_codegen.gyp:policy', ], 'conditions': [ @@ -221,24 +224,24 @@ 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest', }, }, - }], # OS=="win" + }], + ['chrome_multiple_dll==1', { + 'defines': [ + 'CHROME_MULTIPLE_DLL_BROWSER', + ], + }, { + 'dependencies': [ + '<@(chromium_child_dependencies)', + '../content/content.gyp:content_app_child', + '../content/content.gyp:content_worker', + ], + }], ['OS=="mac" and component!="shared_library"', { 'includes': [ 'chrome_dll_bundle.gypi' ], }], ['OS=="mac" and component=="shared_library"', { 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], }, }], - ['chrome_split_dll', { - 'sources': [ - # See comment in .cc for explanation. - 'split_dll_fake_entry.cc', - ], - 'msvs_settings': { - 'VCLinkerTool': { - 'AdditionalOptions': ['/splitlink'], - }, - } - }], ['OS=="mac"', { 'xcode_settings': { # Define the order of symbols within the framework. This @@ -330,5 +333,31 @@ }, ], }], + ['chrome_multiple_dll', { + 'targets': [ + { + 'target_name': 'chrome_child_dll', + 'type': 'shared_library', + 'product_name': 'chrome_child', + 'variables': { + 'enable_wexit_time_destructors': 1, + }, + 'dependencies': [ + '<@(chromium_child_dependencies)', + '../content/content.gyp:content_app_child', + '../content/content.gyp:content_worker', + 'policy_path_parser', + ], + 'defines': [ + 'CHROME_MULTIPLE_DLL_CHILD', + ], + 'sources': [ + 'app/chrome_main.cc', + 'app/chrome_main_delegate.cc', + 'app/chrome_main_delegate.h', + ], + }, # target chrome_child_dll + ], + }], ], } diff --git a/chrome/chrome_syzygy.gyp b/chrome/chrome_syzygy.gyp index 1629f3c..09d4f57 100644 --- a/chrome/chrome_syzygy.gyp +++ b/chrome/chrome_syzygy.gyp @@ -3,7 +3,7 @@ # found in the LICENSE file. { 'conditions': [ - ['OS=="win" and fastbuild==0 and chrome_split_dll==0', { + ['OS=="win" and fastbuild==0 and chrome_multiple_dll==0', { # Reorder or instrument the initial chrome DLL executable, placing the # optimized output and corresponding PDB file into the "syzygy" # subdirectory. diff --git a/chrome/installer/mini_installer_syzygy.gyp b/chrome/installer/mini_installer_syzygy.gyp index 3af4c5c..74050ab 100644 --- a/chrome/installer/mini_installer_syzygy.gyp +++ b/chrome/installer/mini_installer_syzygy.gyp @@ -15,7 +15,7 @@ ], 'conditions': [ # This target won't build in fastbuild, since there are no PDBs. - ['OS=="win" and fastbuild==0 and chrome_split_dll==0', { + ['OS=="win" and fastbuild==0 and chrome_multiple_dll==0', { 'targets': [ { 'target_name': 'mini_installer_syzygy', diff --git a/chrome/split_dll_fake_entry.cc b/chrome/split_dll_fake_entry.cc deleted file mode 100644 index 8b3f078..0000000 --- a/chrome/split_dll_fake_entry.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include <windows.h> - -extern "C" { - -// This entry point and file is used to work around circular dependencies -// between the split DLLs. The CRT initialization will fail if done at attach -// time. Instead, we defer initialization until after both DLLs are loaded and -// then manually call the CRT initialization function (via DoDeferredCrtInit). -// -// ChromeEmptyEntry is the DLL's entry point. - -BOOL WINAPI _DllMainCRTStartup(HINSTANCE, DWORD, LPVOID); - -BOOL WINAPI ChromeEmptyEntry(HINSTANCE hinstance, - DWORD reason, - LPVOID reserved) { - // We are going to do the 'process attach initialization manually via - // DoDeferredCrtInit but we need to let the DLL_THREAD_ATTACH calls work. - if (reason == DLL_PROCESS_ATTACH) - return 1; - return _DllMainCRTStartup(hinstance, reason, reserved); -} - -__declspec(dllexport) BOOL __stdcall DoDeferredCrtInit(HINSTANCE hinstance) { - return _DllMainCRTStartup(hinstance, DLL_PROCESS_ATTACH, NULL); -} - -// This function is needed for the linker to succeed. It seems to pick the -// CRT lib based on the existence of "DllMain", and since we're renaming that, -// it instead chooses the one that links against "main". This function should -// never be called. -int main() { - __debugbreak(); -} - -} diff --git a/components/autofill.gypi b/components/autofill.gypi index 5f4eac8..c956e33 100644 --- a/components/autofill.gypi +++ b/components/autofill.gypi @@ -33,7 +33,7 @@ '../base/base.gyp:base', '../content/content.gyp:content_common', '../ipc/ipc.gyp:ipc', - '../third_party/WebKit/public/blink.gyp:blink', + '../third_party/WebKit/public/blink.gyp:blink_minimal', '../ui/ui.gyp:ui', '../url/url.gyp:url_lib', ], diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index 5bbdb9b..d736a28 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -165,7 +165,8 @@ namespace content { base::LazyInstance<ContentBrowserClient> g_empty_content_browser_client = LAZY_INSTANCE_INITIALIZER; -#if !defined(OS_IOS) +#if !defined(OS_IOS) && \ + (!defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_CHILD)) base::LazyInstance<ContentPluginClient> g_empty_content_plugin_client = LAZY_INSTANCE_INITIALIZER; base::LazyInstance<ContentRendererClient> @@ -292,7 +293,8 @@ class ContentClientInitializer { content_client->browser_ = &g_empty_content_browser_client.Get(); } -#if !defined(OS_IOS) +#if !defined(OS_IOS) && \ + (!defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_CHILD)) if (process_type == switches::kPluginProcess || process_type == switches::kPpapiPluginProcess) { if (delegate) @@ -406,16 +408,20 @@ int RunNamedProcessTypeMain( const MainFunctionParams& main_function_params, ContentMainDelegate* delegate) { static const MainFunction kMainFunctions[] = { +#if !defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_BROWSER) { "", BrowserMain }, +#endif +#if !defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_CHILD) #if defined(ENABLE_PLUGINS) { switches::kPluginProcess, PluginMain }, { switches::kWorkerProcess, WorkerMain }, { switches::kPpapiPluginProcess, PpapiPluginMain }, { switches::kPpapiBrokerProcess, PpapiBrokerMain }, -#endif +#endif // ENABLE_PLUGINS { switches::kUtilityProcess, UtilityMain }, { switches::kRendererProcess, RendererMain }, { switches::kGpuProcess, GpuMain }, +#endif // !CHROME_MULTIPLE_DLL || CHROME_MULTIPLE_DLL_CHILD }; for (size_t i = 0; i < arraysize(kMainFunctions); ++i) { diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 009833d..ea0ac5c 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -165,6 +165,8 @@ void RemoveShaderInfo(int32 id) { } // namespace +#if !defined(CHROME_MULTIPLE_DLL) + // This class creates the IO thread for the renderer when running in // single-process mode. It's not used in multi-process mode. class RendererMainThread : public base::Thread { @@ -208,6 +210,8 @@ class RendererMainThread : public base::Thread { DISALLOW_COPY_AND_ASSIGN(RendererMainThread); }; +#endif + namespace { // Helper class that we pass to ResourceMessageFilter so that it can find the @@ -501,8 +505,8 @@ bool RenderProcessHostImpl::Init() { CreateMessageFilters(); - // Single-process mode not supported in split-dll mode. -#if !defined(CHROME_SPLIT_DLL) + // Single-process mode not supported in multiple-dll mode currently. +#if !defined(CHROME_MULTIPLE_DLL) if (run_renderer_in_process()) { // Crank up a thread and run the initialization there. With the way that // messages flow between the browser and renderer, this thread is required @@ -525,7 +529,7 @@ bool RenderProcessHostImpl::Init() { OnProcessLaunched(); // Fake a callback that the process is ready. } else -#endif // !CHROME_SPLIT_DLL +#endif // !CHROME_MULTIPLE_DLL { // Build command line for renderer. We call AppendRendererCommandLine() // first so the process type argument will appear first. diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h index fd4d123..65933f6 100644 --- a/content/browser/renderer_host/render_process_host_impl.h +++ b/content/browser/renderer_host/render_process_host_impl.h @@ -263,8 +263,10 @@ class CONTENT_EXPORT RenderProcessHostImpl // This is used to clear our cache five seconds after the last use. base::DelayTimer<RenderProcessHostImpl> cached_dibs_cleaner_; +#if !defined(CHROME_MULTIPLE_DLL) // Used in single-process mode. scoped_ptr<RendererMainThread> in_process_renderer_; +#endif // True after Init() has been called. We can't just check channel_ because we // also reset that in the case of process termination. diff --git a/content/content.gyp b/content/content.gyp index 4def8b2..f938e36 100644 --- a/content/content.gyp +++ b/content/content.gyp @@ -52,7 +52,7 @@ 'content_common', ], 'conditions': [ - ['OS != "ios" and chrome_split_dll != 1', { + ['OS != "ios"', { 'dependencies': [ 'content_gpu', 'content_plugin', @@ -74,6 +74,31 @@ 'dependencies': [ 'content_common', ], + 'conditions': [ + ['chrome_multiple_dll', { + 'defines': [ + 'CHROME_MULTIPLE_DLL_BROWSER', + ], + }], + ], + }, + { + 'target_name': 'content_app_child', + 'type': 'static_library', + 'variables': { 'enable_wexit_time_destructors': 1, }, + 'includes': [ + 'content_app.gypi', + ], + 'dependencies': [ + 'content_common', + ], + 'conditions': [ + ['chrome_multiple_dll', { + 'defines': [ + 'CHROME_MULTIPLE_DLL_CHILD', + ], + }], + ], }, { 'target_name': 'content_browser', @@ -87,18 +112,12 @@ 'content_resources.gyp:content_resources', ], 'conditions': [ - ['OS != "ios" and chrome_split_dll != 1', { + ['OS != "ios"', { 'dependencies': [ 'content_gpu', - 'content_renderer', 'content_utility', ], }], - ['chrome_split_dll', { - 'dependencies': [ - 'content_gpu', - ], - }], ['java_bridge==1', { 'dependencies': [ 'content_child', @@ -274,6 +293,11 @@ 'dependencies': ['content', 'content_browser'], }, { + 'target_name': 'content_app_child', + 'type': 'none', + 'dependencies': ['content', 'content_child'], + }, + { 'target_name': 'content_browser', 'type': 'none', 'dependencies': ['content'], diff --git a/content/content_common.gypi b/content/content_common.gypi index f55381c..aaa7659 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -377,7 +377,7 @@ '../gpu/gpu.gyp:gpu_ipc', '../ipc/ipc.gyp:ipc', '../media/media.gyp:shared_memory_support', - '../third_party/WebKit/public/blink.gyp:blink', + '../third_party/WebKit/public/blink.gyp:blink_minimal', '../ui/gl/gl.gyp:gl', '../webkit/common/webkit_common.gyp:webkit_common', '../webkit/storage_browser.gyp:webkit_storage_browser', diff --git a/content/content_tests.gypi b/content/content_tests.gypi index c8fb74c..374b2aa 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -167,6 +167,7 @@ 'dependencies': [ 'content_child', 'content_ppapi_plugin', + 'content_renderer', 'content_utility', 'content_worker', '../ppapi/ppapi_internal.gyp:ppapi_host', diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc index a16ac60..88ce4aa 100644 --- a/content/public/app/content_main_delegate.cc +++ b/content/public/app/content_main_delegate.cc @@ -49,11 +49,15 @@ ZygoteForkDelegate* ContentMainDelegate::ZygoteStarting() { #endif ContentBrowserClient* ContentMainDelegate::CreateContentBrowserClient() { +#if defined(CHROME_MULTIPLE_DLL_CHILD) + return NULL; +#else return new ContentBrowserClient(); +#endif } ContentPluginClient* ContentMainDelegate::CreateContentPluginClient() { -#if defined(OS_IOS) +#if defined(OS_IOS) || defined(CHROME_MULTIPLE_DLL_BROWSER) return NULL; #else return new ContentPluginClient(); @@ -61,7 +65,7 @@ ContentPluginClient* ContentMainDelegate::CreateContentPluginClient() { } ContentRendererClient* ContentMainDelegate::CreateContentRendererClient() { -#if defined(OS_IOS) +#if defined(OS_IOS) || defined(CHROME_MULTIPLE_DLL_BROWSER) return NULL; #else return new ContentRendererClient(); @@ -69,7 +73,7 @@ ContentRendererClient* ContentMainDelegate::CreateContentRendererClient() { } ContentUtilityClient* ContentMainDelegate::CreateContentUtilityClient() { -#if defined(OS_IOS) +#if defined(OS_IOS) || defined(CHROME_MULTIPLE_DLL_BROWSER) return NULL; #else return new ContentUtilityClient(); diff --git a/ui/keyboard/keyboard.gyp b/ui/keyboard/keyboard.gyp index 1cd00ce..d4d7ea1 100644 --- a/ui/keyboard/keyboard.gyp +++ b/ui/keyboard/keyboard.gyp @@ -77,7 +77,7 @@ 'dependencies': [ '../../base/base.gyp:base', '../../base/base.gyp:test_support_base', - '../../content/content.gyp:content_browser', + '../../content/content.gyp:content', '../../skia/skia.gyp:skia', '../../testing/gtest.gyp:gtest', '../aura/aura.gyp:aura', diff --git a/ui/views/views.gyp b/ui/views/views.gyp index 583e691..ab24111 100644 --- a/ui/views/views.gyp +++ b/ui/views/views.gyp @@ -979,8 +979,8 @@ '../../base/base.gyp:base', '../../base/base.gyp:base_i18n', '../../chrome/chrome_resources.gyp:packed_resources', - '../../content/content.gyp:content_shell_lib', '../../content/content.gyp:content', + '../../content/content.gyp:content_shell_lib', '../../content/content.gyp:test_support_content', '../../skia/skia.gyp:skia', '../../third_party/icu/icu.gyp:icui18n', diff --git a/webkit/glue/webkitplatformsupport_impl.cc b/webkit/glue/webkitplatformsupport_impl.cc index 5e5f71d..2e14a2b 100644 --- a/webkit/glue/webkitplatformsupport_impl.cc +++ b/webkit/glue/webkitplatformsupport_impl.cc @@ -451,8 +451,6 @@ const unsigned char* WebKitPlatformSupportImpl::getTraceCategoryEnabledFlag( long* WebKitPlatformSupportImpl::getTraceSamplingState( const unsigned thread_bucket) { - // Not supported in split-dll build. http://crbug.com/237249 -#if !defined(CHROME_SPLIT_DLL) switch (thread_bucket) { case 0: return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(0)); @@ -463,7 +461,6 @@ long* WebKitPlatformSupportImpl::getTraceSamplingState( default: NOTREACHED() << "Unknown thread bucket type."; } -#endif return NULL; } |