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

Unified Diff: base/memory/shared_memory_posix.cc

Issue 2872503003: Add crash keys about field trial shared memory errors. (Closed)
Patch Set: Rebased Created 3 years, 7 months 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_mac.cc ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_posix.cc
diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc
index df9fbb7a453d0966ef668bc2aca5e446c536f5d6..5d71c300ebe6379ad1839b3f7ddb94acd7a271ca 100644
--- a/base/memory/shared_memory_posix.cc
+++ b/base/memory/shared_memory_posix.cc
@@ -113,8 +113,8 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
FilePath path;
if (options.name_deprecated == NULL || options.name_deprecated->empty()) {
- bool result =
- CreateAnonymousSharedMemory(options, &fp, &readonly_fd, &path);
+ bool result = CreateAnonymousSharedMemory(options, &fp, &readonly_fd, &path,
+ &last_error_);
if (!result)
return false;
} else {
@@ -205,8 +205,9 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
int mapped_file = -1;
int readonly_mapped_file = -1;
- bool result = PrepareMapFile(std::move(fp), std::move(readonly_fd),
- &mapped_file, &readonly_mapped_file);
+ bool result =
+ PrepareMapFile(std::move(fp), std::move(readonly_fd), &mapped_file,
+ &readonly_mapped_file, &last_error_);
shm_ = SharedMemoryHandle(base::FileDescriptor(mapped_file, false),
UnguessableToken::Create());
readonly_shm_ = SharedMemoryHandle(
@@ -245,8 +246,9 @@ bool SharedMemory::Open(const std::string& name, bool read_only) {
}
int mapped_file = -1;
int readonly_mapped_file = -1;
- bool result = PrepareMapFile(std::move(fp), std::move(readonly_fd),
- &mapped_file, &readonly_mapped_file);
+ bool result =
+ PrepareMapFile(std::move(fp), std::move(readonly_fd), &mapped_file,
+ &readonly_mapped_file, &last_error_);
// This form of sharing shared memory is deprecated. https://crbug.com/345734.
// However, we can't get rid of it without a significant refactor because its
// used to communicate between two versions of the same service process, very
« no previous file with comments | « base/memory/shared_memory_mac.cc ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698