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

Unified Diff: src/platform-openbsd.cc

Issue 10084003: Valgrind cleanliness, part 6: Introduce OS::TearDown, cleaning up 2 mutexes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed typo. Created 8 years, 8 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/platform-nullos.cc ('k') | src/platform-solaris.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-openbsd.cc
diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc
index 2b2d5308eb1cbceb8cd42f13999dae02dece5688..ba33a8444e23760a2b47585cb82e5c750074a8fd 100644
--- a/src/platform-openbsd.cc
+++ b/src/platform-openbsd.cc
@@ -793,11 +793,8 @@ class SignalSender : public Thread {
vm_tgid_(getpid()),
interval_(interval) {}
- static void SetUp() {
- if (!mutex_) {
- mutex_ = OS::CreateMutex();
- }
- }
+ static void SetUp() { if (!mutex_) mutex_ = OS::CreateMutex(); }
+ static void TearDown() { delete mutex_; }
static void InstallSignalHandler() {
struct sigaction sa;
@@ -948,6 +945,12 @@ void OS::SetUp() {
}
+void OS::TearDown() {
+ SignalSender::TearDown();
+ delete limit_mutex;
+}
+
+
Sampler::Sampler(Isolate* isolate, int interval)
: isolate_(isolate),
interval_(interval),
« no previous file with comments | « src/platform-nullos.cc ('k') | src/platform-solaris.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698