Commit 9426fb80 authored by shrikant's avatar shrikant Committed by Commit bot

On Windows, if intention for shared memory name is empty then we pass NULL.

With new appcontainer token in picture, it fails to create shared memory with empty name like "", it explicity seem to need NULL for anonymous.

BUG=455496
R=cpu

Review URL: https://codereview.chromium.org/950993003

Cr-Commit-Position: refs/heads/master@{#317689}
parent 8fab3e60
...@@ -144,7 +144,8 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) { ...@@ -144,7 +144,8 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
rand_values[2], rand_values[3]); rand_values[2], rand_values[3]);
} }
mapped_file_ = CreateFileMapping(INVALID_HANDLE_VALUE, &sa, mapped_file_ = CreateFileMapping(INVALID_HANDLE_VALUE, &sa,
PAGE_READWRITE, 0, static_cast<DWORD>(rounded_size), name_.c_str()); PAGE_READWRITE, 0, static_cast<DWORD>(rounded_size),
name_.empty() ? nullptr : name_.c_str());
if (!mapped_file_) if (!mapped_file_)
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment