Chromium Code Reviews| Index: base/memory/shared_memory_win.cc |
| diff --git a/base/memory/shared_memory_win.cc b/base/memory/shared_memory_win.cc |
| index 7de87a98a9dd91a3647c4c20c47e8c977136e9c9..6623e8caefde4b74157be1723414706418374f0f 100644 |
| --- a/base/memory/shared_memory_win.cc |
| +++ b/base/memory/shared_memory_win.cc |
| @@ -8,6 +8,8 @@ |
| #include <stddef.h> |
| #include <stdint.h> |
| +#include "base/debug/alias.h" |
| +#include "base/debug/dump_without_crashing.h" |
| #include "base/logging.h" |
| #include "base/metrics/histogram_macros.h" |
| #include "base/rand_util.h" |
| @@ -108,6 +110,11 @@ HANDLE CreateFileMappingWithReducedPermissions(SECURITY_ATTRIBUTES* sa, |
| HANDLE h = CreateFileMapping(INVALID_HANDLE_VALUE, sa, PAGE_READWRITE, 0, |
| static_cast<DWORD>(rounded_size), name); |
| if (!h) { |
| + // Debugging to help track down https://crbug.com/585013 |
| + DWORD last_error = ::GetLastError(); |
| + base::debug::Alias(&last_error); |
| + base::debug::DumpWithoutCrashing(); |
|
Nico
2016/05/24 00:22:13
is this code perf-sensitive? Should this just be f
erikchen
2016/05/24 00:41:20
This is perf-sensitive, but shouldn't be hit often
|
| + |
| LogError(CREATE_FILE_MAPPING_FAILURE); |
| return nullptr; |
| } |