summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-04 00:58:39 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-04 00:58:39 +0000
commit9e51af9018550b6b23802f66469310f5d1790ab9 (patch)
tree9ab6f3e0532f6d23c2af1d0acc5605ad00876418 /chrome/renderer
parent4c7ca4b8c2ceb6f823474744f035672c8501d23b (diff)
downloadchromium_src-9e51af9018550b6b23802f66469310f5d1790ab9.zip
chromium_src-9e51af9018550b6b23802f66469310f5d1790ab9.tar.gz
chromium_src-9e51af9018550b6b23802f66469310f5d1790ab9.tar.bz2
Properly honor base::SharedMemory semantics for name="" to mean
new/private shared memory on POSIX. Transition base::SharedMemory implementation to file/mmap() to prevent leaking of wired kernel resources and allow easier cleanup. Enable one more shared_memory unit test for POSIX. Enable stats_table_unittest.cc for Mac, and modify it so it cleans up. Review URL: http://codereview.chromium.org/19724 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_process.cc11
1 files changed, 1 insertions, 10 deletions
diff --git a/chrome/renderer/render_process.cc b/chrome/renderer/render_process.cc
index 91fd430..1333af7 100644
--- a/chrome/renderer/render_process.cc
+++ b/chrome/renderer/render_process.cc
@@ -121,15 +121,6 @@ bool RenderProcess::ShouldLoadPluginsInProcess() {
// static
base::SharedMemory* RenderProcess::AllocSharedMemory(size_t size) {
-#if defined(OS_LINUX)
- // Linux has trouble with ""; the Create() call below will fail when
- // triggered by RenderProcessTest.TestSharedMemoryAllocOne(), every
- // time.
- std::wstring root_name(L"root");
-#else
- std::wstring root_name(L"");
-#endif
-
self()->clearer_factory_.RevokeAll();
base::SharedMemory* mem = self()->GetSharedMemFromCache(size);
@@ -144,7 +135,7 @@ base::SharedMemory* RenderProcess::AllocSharedMemory(size_t size) {
mem = new base::SharedMemory();
if (!mem)
return NULL;
- if (!mem->Create(root_name, false, true, size)) {
+ if (!mem->Create(L"", false, true, size)) {
delete mem;
return NULL;
}