Index: content/browser/child_process_launcher_helper_posix.cc |
diff --git a/content/browser/child_process_launcher_helper_posix.cc b/content/browser/child_process_launcher_helper_posix.cc |
index 96efa993d5158a944547d90ceed3d84e4e49a15d..9b2f6e0fc6285b2453e77974a4e12a4f8bde8ddc 100644 |
--- a/content/browser/child_process_launcher_helper_posix.cc |
+++ b/content/browser/child_process_launcher_helper_posix.cc |
@@ -80,9 +80,12 @@ std::unique_ptr<FileDescriptorInfo> CreateDefaultPosixFilesToMap( |
std::unique_ptr<FileDescriptorInfo> files_to_register( |
FileDescriptorInfoImpl::Create()); |
- int field_trial_handle = base::FieldTrialList::GetFieldTrialHandle(); |
- if (field_trial_handle != base::kInvalidPlatformFile) |
- files_to_register->Share(kFieldTrialDescriptor, field_trial_handle); |
+ base::SharedMemoryHandle shm = base::FieldTrialList::GetFieldTrialHandle(); |
+ if (shm.IsValid()) { |
+ files_to_register->Share( |
+ kFieldTrialDescriptor, |
+ base::SharedMemory::GetFdFromSharedMemoryHandle(shm)); |
+ } |
DCHECK(mojo_client_handle.is_valid()); |
files_to_register->Share(kMojoIPCChannel, mojo_client_handle.handle); |