Chromium Code Reviews| Index: base/process/memory_win.cc |
| diff --git a/base/process/memory_win.cc b/base/process/memory_win.cc |
| index d433020debb6dabe70e85a430d62bd191d4bbdd0..3380c7b4bb61eb519f90fde8987b4b9653f5cea9 100644 |
| --- a/base/process/memory_win.cc |
| +++ b/base/process/memory_win.cc |
| @@ -35,8 +35,11 @@ NOINLINE int OnNoMemory(size_t size) { |
| // Kill the process. This is important for security since most of code |
| // does not check the result of memory allocation. |
| // https://msdn.microsoft.com/en-us/library/het71c37.aspx |
| - ::RaiseException(win::kOomExceptionCode, EXCEPTION_NONCONTINUABLE, 0, |
| - nullptr); |
| + // Pass the size of the failed request |
|
scottmg
2017/02/06 18:17:41
'.' at end of sentence.
Sigurður Ásgeirsson
2017/02/06 19:43:58
Ooops, abortive comment - thanks. Done.
|
| + ULONG_PTR exception_args[] = {size}; |
| + ::RaiseException(win::kOomExceptionCode, EXCEPTION_NONCONTINUABLE, |
| + arraysize(exception_args), exception_args); |
| + |
| // Safety check, make sure process exits here. |
| _exit(win::kOomExceptionCode); |
| return 0; |