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

Unified Diff: src/isolate.cc

Issue 2918703002: Localize counter class member functions. (Closed)
Patch Set: Remove need for mutex to initialize counters. 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
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index f2564f9f3eb83cfb1042b2d583b1295c03e88332..481e852447257e234d1fbaadb0b3a5b79c4a71ab 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2637,11 +2637,7 @@ bool Isolate::PropagatePendingExceptionToExternalTryCatch() {
return true;
}
-static base::LazyMutex initialize_counters_mutex = LAZY_MUTEX_INITIALIZER;
-
bool Isolate::InitializeCounters() {
- if (counters_ != nullptr) return false;
- base::LockGuard<base::Mutex> guard(initialize_counters_mutex.Pointer());
if (counters_ != nullptr) return false;
counters_shared_ = std::make_shared<Counters>(this);
counters_ = counters_shared_.get();
« src/counters.cc ('K') | « src/counters.cc ('k') | test/unittests/counters-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698