Bug 1147446: Chromium patch to fix memory leak in Windows sandbox sharedmem_ipc_server.cc. r=aklotz
authorBob Owen <bobowencode@gmail.com>
Thu, 26 Mar 2015 08:06:04 +0000
changeset 264648 f3cc3b9043084be12923819f1136410549d3c362
parent 264647 748b96aa103bf1e8d785504eda0e43bc348f6880
child 264649 d2ac6c4c13bd83a19bd8b570bad60d080cf5229e
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaklotz
bugs1147446
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1147446: Chromium patch to fix memory leak in Windows sandbox sharedmem_ipc_server.cc. r=aklotz
security/sandbox/chromium/sandbox/win/src/sharedmem_ipc_server.cc
security/sandbox/moz-chromium-commit-status.txt
--- a/security/sandbox/chromium/sandbox/win/src/sharedmem_ipc_server.cc
+++ b/security/sandbox/chromium/sandbox/win/src/sharedmem_ipc_server.cc
@@ -54,16 +54,19 @@ SharedMemIPCServer::~SharedMemIPCServer(
   // Free the IPC signal events.
   ServerContexts::iterator it;
   for (it = server_contexts_.begin(); it != server_contexts_.end(); ++it) {
     ServerControl* context = (*it);
     ::CloseHandle(context->ping_event);
     ::CloseHandle(context->pong_event);
     delete context;
   }
+
+  if (client_control_)
+    ::UnmapViewOfFile(client_control_);
 }
 
 bool SharedMemIPCServer::Init(void* shared_mem, uint32 shared_size,
                               uint32 channel_size) {
   // The shared memory needs to be at least as big as a channel.
   if (shared_size < channel_size) {
     return false;
   }
@@ -225,17 +228,17 @@ bool SharedMemIPCServer::InvokeCallback(
   scoped_ptr<CrossCallParamsEx> params(
       CrossCallParamsEx::CreateFromBuffer(ipc_buffer,
                                           service_context->channel_size,
                                           &output_size));
   if (!params.get())
     return false;
 
   uint32 tag = params->GetTag();
-  COMPILE_ASSERT(0 == INVALID_TYPE, Incorrect_type_enum);
+  static_assert(0 == INVALID_TYPE, "incorrect type enum");
   IPCParams ipc_params = {0};
   ipc_params.ipc_tag = tag;
 
   void* args[kMaxIpcParams];
   if (!GetArgs(params.get(), &ipc_params, args))
     return false;
 
   IPCInfo ipc_info = {0};
--- a/security/sandbox/moz-chromium-commit-status.txt
+++ b/security/sandbox/moz-chromium-commit-status.txt
@@ -1,3 +1,4 @@
 Chromium Commit                            Directory / File (relative to security/sandbox/)
 ----------------------------------------   ------------------------------------------------
 df7cc6c04725630dd4460f29d858a77507343b24   chromium
+b533d6533585377edd63ec6500469f6c4fba602a   chromium/sandbox/win/src/sharedmem_ipc_server.cc