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

Unified Diff: src/heap-profiler.cc

Issue 2800009: Fix issue 738: make compilable with profilingsupport=off (Closed)
Patch Set: Created 10 years, 6 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 | « src/heap-profiler.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-profiler.cc
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
index ea17abc33d930dbf2dc2e2fcb755a063eb4380d6..55f09b92831f87e93a3338f1595b07b213b5a676 100644
--- a/src/heap-profiler.cc
+++ b/src/heap-profiler.cc
@@ -326,20 +326,27 @@ HeapProfiler::~HeapProfiler() {
delete snapshots_;
}
+#endif // ENABLE_LOGGING_AND_PROFILING
void HeapProfiler::Setup() {
+#ifdef ENABLE_LOGGING_AND_PROFILING
if (singleton_ == NULL) {
singleton_ = new HeapProfiler();
}
+#endif
}
void HeapProfiler::TearDown() {
+#ifdef ENABLE_LOGGING_AND_PROFILING
delete singleton_;
singleton_ = NULL;
+#endif
}
+#ifdef ENABLE_LOGGING_AND_PROFILING
+
HeapSnapshot* HeapProfiler::TakeSnapshot(const char* name) {
ASSERT(singleton_ != NULL);
return singleton_->TakeSnapshotImpl(name);
« no previous file with comments | « src/heap-profiler.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698