Index: runtime/vm/malloc_hooks.cc |
diff --git a/runtime/vm/malloc_hooks.cc b/runtime/vm/malloc_hooks.cc |
index 2721000616898ec0915be2bb81cd8c6b45758cd5..d33f2be17ac41db9f721c360d9230c1677693755 100644 |
--- a/runtime/vm/malloc_hooks.cc |
+++ b/runtime/vm/malloc_hooks.cc |
@@ -154,14 +154,6 @@ class AllocationInfo { |
Sample* sample_; |
uword address_; |
intptr_t allocation_size_; |
- |
- // The number of frames that are generated by the malloc hooks and collection |
- // of the stack trace. These frames are ignored when collecting the stack |
- // trace for a memory allocation. If this number is incorrect, some tests in |
- // malloc_hook_tests.cc might fail, particularily |
- // StackTraceMallocHookLengthTest. If this value is updated, please make sure |
- // that the MallocHooks test cases pass on all platforms. |
- static const intptr_t kSkipCount = 6; |
}; |
@@ -443,7 +435,8 @@ void MallocHooksState::RecordFreeHook(const void* ptr) { |
if (MallocHooksState::address_map()->Lookup(ptr, &allocation_info)) { |
MallocHooksState::DecrementHeapAllocatedMemoryInBytes( |
allocation_info->allocation_size()); |
- ASSERT(MallocHooksState::address_map()->Remove(ptr)); |
+ bool result = MallocHooksState::address_map()->Remove(ptr); |
Cutch
2017/03/27 17:52:29
const bool ...
|
+ ASSERT(result); |
delete allocation_info; |
} |
} |