Index: base/metrics/field_trial.cc |
diff --git a/base/metrics/field_trial.cc b/base/metrics/field_trial.cc |
index 78602f1e613d39f00020dea6f1f18f093bcfa72f..9a0121635830b943057e40a9eece6fa35ee74ca8 100644 |
--- a/base/metrics/field_trial.cc |
+++ b/base/metrics/field_trial.cc |
@@ -11,6 +11,7 @@ |
#include "base/build_time.h" |
#include "base/command_line.h" |
#include "base/debug/activity_tracker.h" |
+#include "base/debug/crash_logging.h" |
#include "base/logging.h" |
#include "base/metrics/field_trial_param_associator.h" |
#include "base/process/memory.h" |
@@ -1230,11 +1231,25 @@ void FieldTrialList::InstantiateFieldTrialAllocatorIfNeeded() { |
#endif |
std::unique_ptr<SharedMemory> shm(new SharedMemory()); |
- if (!shm->Create(options)) |
+ if (!shm->Create(options)) { |
+#if !defined(OS_NACL) |
+ // Temporary for http://crbug.com/703649. |
+ base::debug::ScopedCrashKey crash_key( |
+ "field_trial_shmem_create_error", |
+ base::IntToString(static_cast<int>(shm->get_last_error()))); |
+#endif |
OnOutOfMemory(kFieldTrialAllocationSize); |
+ } |
- if (!shm->Map(kFieldTrialAllocationSize)) |
+ if (!shm->Map(kFieldTrialAllocationSize)) { |
+#if !defined(OS_NACL) |
+ // Temporary for http://crbug.com/703649. |
+ base::debug::ScopedCrashKey crash_key( |
+ "field_trial_shmem_map_error", |
+ base::IntToString(static_cast<int>(shm->get_last_error()))); |
+#endif |
OnOutOfMemory(kFieldTrialAllocationSize); |
+ } |
global_->field_trial_allocator_.reset( |
new FieldTrialAllocator(std::move(shm), 0, kAllocatorName, false)); |