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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1004043002: Re-land: base: Implement browser process support for discardable memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set allocator instance for blink tests Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/host_discardable_shared_memory_manager.cc ('k') | content/test/blink_test_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 184bcc6121ffa5f80987507691e0facbb2ac4b44..4e8819c49cbdf9182268b6ebf187cb801be81044 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -656,8 +656,12 @@ void RenderThreadImpl::Init() {
#endif
}
- base::DiscardableMemoryShmemAllocator::SetInstance(
- ChildThreadImpl::discardable_shared_memory_manager());
+ // In single process, browser main loop set up the discardable memory
+ // allocator.
+ if (!command_line.HasSwitch(switches::kSingleProcess)) {
+ base::DiscardableMemoryShmemAllocator::SetInstance(
+ ChildThreadImpl::discardable_shared_memory_manager());
+ }
service_registry()->AddService<RenderFrameSetup>(
base::Bind(CreateRenderFrameSetup));
« no previous file with comments | « content/common/host_discardable_shared_memory_manager.cc ('k') | content/test/blink_test_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698