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

Unified Diff: src/isolate.cc

Issue 2906063002: Move StatsTable into the Counters class. (Closed)
Patch Set: Fix nits. Created 3 years, 7 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/counters.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 3ea27298024334d7c15c16058d99d8d9160bbffb..ee8ca7f04acb05776663f23f0975df1ae4c5736a 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2540,7 +2540,6 @@ Isolate::~Isolate() {
store_stub_cache_ = NULL;
delete code_aging_helper_;
code_aging_helper_ = NULL;
- delete stats_table_;
stats_table_ = NULL;
delete materialized_object_store_;
@@ -2844,10 +2843,9 @@ bool Isolate::Init(Deserializer* des) {
// Initialized lazily to allow early
// v8::V8::SetAddHistogramSampleFunction calls.
StatsTable* Isolate::stats_table() {
- if (stats_table_ == NULL) {
- stats_table_ = new StatsTable;
- }
- return stats_table_;
+ if (stats_table_ != nullptr) return stats_table_;
+ InitializeCounters();
+ return stats_table_ = counters_->stats_table();
}
« no previous file with comments | « src/counters.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698