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

Unified Diff: base/memory/shared_memory_win.cc

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « base/memory/shared_memory_unittest.cc ('k') | base/message_loop/incoming_task_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_win.cc
diff --git a/base/memory/shared_memory_win.cc b/base/memory/shared_memory_win.cc
index 5d2fa2af9fccf217d47122c40f3252f1024f8b6a..20659ab97af7b1d3220c077d69435146db226f3e 100644
--- a/base/memory/shared_memory_win.cc
+++ b/base/memory/shared_memory_win.cc
@@ -71,6 +71,7 @@ SharedMemory::SharedMemory(SharedMemoryHandle handle, bool read_only,
}
SharedMemory::~SharedMemory() {
+ Unmap();
Close();
if (lock_ != NULL)
CloseHandle(lock_);
@@ -249,11 +250,6 @@ bool SharedMemory::ShareToProcessCommon(ProcessHandle process,
void SharedMemory::Close() {
- if (memory_ != NULL) {
- UnmapViewOfFile(memory_);
- memory_ = NULL;
- }
-
if (mapped_file_ != NULL) {
CloseHandle(mapped_file_);
mapped_file_ = NULL;
« no previous file with comments | « base/memory/shared_memory_unittest.cc ('k') | base/message_loop/incoming_task_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698