OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "platform/PartitionAllocMemoryDumpProvider.h" | 6 #include "platform/PartitionAllocMemoryDumpProvider.h" |
7 | 7 |
8 #include "public/platform/WebMemoryAllocatorDump.h" | 8 #include "public/platform/WebMemoryAllocatorDump.h" |
9 #include "public/platform/WebProcessMemoryDump.h" | 9 #include "public/platform/WebProcessMemoryDump.h" |
10 #include "wtf/Partitions.h" | 10 #include "wtf/Partitions.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 | 109 |
110 PartitionAllocMemoryDumpProvider::PartitionAllocMemoryDumpProvider() | 110 PartitionAllocMemoryDumpProvider::PartitionAllocMemoryDumpProvider() |
111 { | 111 { |
112 } | 112 } |
113 | 113 |
114 PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider() | 114 PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider() |
115 { | 115 { |
116 } | 116 } |
117 | 117 |
| 118 void PartitionAllocMemoryDumpProvider::onHeapProfilingEnabled(AllocationHook* al
locationHook, FreeHook* freeHook) |
| 119 { |
| 120 // Make PartitionAlloc call |allocationHook| and |freeHook| for every |
| 121 // subsequent allocation and free (or not if the pointers are null). |
| 122 PartitionAllocHooks::setAllocationHook(allocationHook); |
| 123 PartitionAllocHooks::setFreeHook(freeHook); |
| 124 } |
| 125 |
118 } // namespace blink | 126 } // namespace blink |
OLD | NEW |