Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(760)

Unified Diff: runtime/vm/malloc_hooks.cc

Issue 2718723003: Fixed issue where MallocHooks tests would try and re-initialize the hooks and ended up hitting an a… (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/malloc_hooks.cc
diff --git a/runtime/vm/malloc_hooks.cc b/runtime/vm/malloc_hooks.cc
index 7fb2238923b564ced22324d89ca40ca9fe3588d3..d838457889c2eb61561053c0ef251d79534492cb 100644
--- a/runtime/vm/malloc_hooks.cc
+++ b/runtime/vm/malloc_hooks.cc
@@ -263,7 +263,7 @@ void MallocHooksState::TearDown() {
void MallocHooks::InitOnce() {
- if (!FLAG_enable_malloc_hooks) {
+ if (!FLAG_enable_malloc_hooks || MallocHooks::Active()) {
return;
}
MallocLocker ml(MallocHooksState::malloc_hook_mutex(),
@@ -282,7 +282,7 @@ void MallocHooks::InitOnce() {
void MallocHooks::TearDown() {
- if (!FLAG_enable_malloc_hooks) {
+ if (!FLAG_enable_malloc_hooks || !MallocHooks::Active()) {
return;
}
MallocLocker ml(MallocHooksState::malloc_hook_mutex(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698