| Index: base/allocator/allocator_shim.cc
|
| diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc
|
| index bad8fc6e281e2789841ae9edb6a844f9bc1df946..a680cd5f750c00a62a67a2e8a2953c5f1401a616 100644
|
| --- a/base/allocator/allocator_shim.cc
|
| +++ b/base/allocator/allocator_shim.cc
|
| @@ -90,6 +90,10 @@ inline const allocator::AllocatorDispatch* GetChainHead() {
|
| namespace base {
|
| namespace allocator {
|
|
|
| +#if defined(OS_MACOSX)
|
| +bool g_is_mac_shim_layer_initialized = false;
|
| +#endif
|
| +
|
| void SetCallNewHandlerOnMallocFailure(bool value) {
|
| g_call_new_handler_on_malloc_failure = value;
|
| }
|
| @@ -305,6 +309,8 @@ void InitializeAllocatorShim() {
|
| // This replaces the default malloc zone, causing calls to malloc & friends
|
| // from the codebase to be routed to ShimMalloc() above.
|
| OverrideMacSymbols();
|
| +
|
| + g_is_mac_shim_layer_initialized = true;
|
| }
|
| } // namespace allocator
|
| } // namespace base
|
|
|