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

Unified Diff: runtime/vm/malloc_hooks_unsupported.cc

Issue 2711353003: Fixed tests not having MallocHooks initialized for tests in release mode. (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 | « runtime/vm/malloc_hooks_test.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/malloc_hooks_unsupported.cc
diff --git a/runtime/vm/malloc_hooks_unsupported.cc b/runtime/vm/malloc_hooks_unsupported.cc
index 733e3ded74efdad658a44870dfedb9d540701805..1f8b75a45ddfca65d2123a0469db91b96d5d05b5 100644
--- a/runtime/vm/malloc_hooks_unsupported.cc
+++ b/runtime/vm/malloc_hooks_unsupported.cc
@@ -4,7 +4,8 @@
#include "platform/globals.h"
-#if !defined(DART_USE_TCMALLOC) || defined(PRODUCT)
+#if !defined(DART_USE_TCMALLOC) || defined(PRODUCT) || \
+ defined(TARGET_ARCH_DBC) || defined(TARGET_OS_FUCHSIA)
#include "vm/malloc_hooks.h"
@@ -20,6 +21,21 @@ void MallocHooks::TearDown() {
}
+bool MallocHooks::ProfilingEnabled() {
+ return false;
+}
+
+
+bool MallocHooks::stack_trace_collection_enabled() {
+ return false;
+}
+
+
+void MallocHooks::set_stack_trace_collection_enabled(bool enabled) {
+ // Do nothing.
+}
+
+
void MallocHooks::ResetStats() {
// Do nothing.
}
@@ -46,4 +62,5 @@ intptr_t MallocHooks::heap_allocated_memory_in_bytes() {
} // namespace dart
-#endif // defined(DART_USE_TCMALLOC) || defined(PRODUCT)
+#endif // !defined(DART_USE_TCMALLOC) || defined(PRODUCT) ||
+ // defined(TARGET_ARCH_DBC) || defined(TARGET_OS_FUCHSIA)
« no previous file with comments | « runtime/vm/malloc_hooks_test.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698