@@ -30,21 +30,22 @@ index 97ce94e..a716db7 100644
3030 if (options.size == 0) return false;
3131
3232diff --git a/src/base/memory/shared_memory_posix.cc b/src/base/memory/shared_memory_posix.cc
33- index d55c2df..13b6150 100644
33+ index d55c2df..54e0c49 100644
3434--- a/src/base/memory/shared_memory_posix.cc
3535+++ b/src/base/memory/shared_memory_posix.cc
36- @@ -16,8 +16,10 @@
37- #include "base/logging.h"
36+ @@ -17,7 +17,11 @@
3837 #include "base/posix/eintr_wrapper.h"
3938 #include "base/posix/safe_strerror.h"
40- + #if 0
4139 #include "base/process/process_metrics.h"
40+ + #if 0
4241 #include "base/profiler/scoped_tracker.h"
42+ + #else
43+ + #include "base/threading/thread_restrictions.h"
4344+ #endif
4445 #include "base/scoped_generic.h"
4546 #include "base/strings/utf_string_conversions.h"
4647 #include "build/build_config.h"
47- @@ -37,9 +39 ,11 @@ struct ScopedPathUnlinkerTraits {
48+ @@ -37,9 +41 ,11 @@ struct ScopedPathUnlinkerTraits {
4849 static void Free(FilePath* path) {
4950 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466437
5051 // is fixed.
@@ -56,7 +57,7 @@ index d55c2df..13b6150 100644
5657 if (unlink(path->value().c_str()))
5758 PLOG(WARNING) << "unlink";
5859 }
59- @@ -67,9 +71 ,11 @@ bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options,
60+ @@ -67,9 +73 ,11 @@ bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options,
6061 if (GetShmemTempDir(options.executable, &directory)) {
6162 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466437
6263 // is fixed.
@@ -68,7 +69,7 @@ index d55c2df..13b6150 100644
6869 fp->reset(base::CreateAndOpenTemporaryFileInDir(directory, path));
6970
7071 // Deleting the file prevents anyone else from mapping it in (making it
71- @@ -83,9 +89 ,11 @@ bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options,
72+ @@ -83,9 +91 ,11 @@ bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options,
7273 if (options.share_read_only) {
7374 // TODO(erikchen): Remove ScopedTracker below once
7475 // http://crbug.com/466437 is fixed.
@@ -80,7 +81,7 @@ index d55c2df..13b6150 100644
8081 // Also open as readonly so that we can ShareReadOnlyToProcess.
8182 readonly_fd->reset(HANDLE_EINTR(open(path->value().c_str(), O_RDONLY)));
8283 if (!readonly_fd->is_valid()) {
83- @@ -194,9 +202 ,11 @@ bool SharedMemory::GetSizeFromSharedMemoryHandle(
84+ @@ -194,9 +204 ,11 @@ bool SharedMemory::GetSizeFromSharedMemoryHandle(
8485 bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
8586 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466437
8687 // is fixed.
0 commit comments