1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_codecoveragehandler_h
7 #define mozilla_codecoveragehandler_h
9 #include "mozilla/StaticPtr.h"
10 #include "mozilla/ipc/CrossProcessMutex.h"
14 class CodeCoverageHandler
{
17 static void Init(CrossProcessMutexHandle aHandle
);
18 static CodeCoverageHandler
* Get();
19 CrossProcessMutex
* GetMutex();
20 CrossProcessMutexHandle
GetMutexHandle();
21 static void FlushCounters(const bool initialized
= false);
22 static void FlushCountersSignalHandler(int);
25 CodeCoverageHandler();
26 explicit CodeCoverageHandler(CrossProcessMutexHandle aHandle
);
28 static StaticAutoPtr
<CodeCoverageHandler
> instance
;
29 CrossProcessMutex mGcovLock
;
31 DISALLOW_COPY_AND_ASSIGN(CodeCoverageHandler
);
33 void SetSignalHandlers();
36 } // namespace mozilla
38 #endif // mozilla_codecoveragehandler_h