Bug 1853074 - Mark scrollend-event-for-user-scroll.html as intermittent on windows...
[gecko.git] / tools / code-coverage / CodeCoverageHandler.h
blob7c1b33ec8a95759ebf1b0ec7b9728a6391ed13b4
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"
12 namespace mozilla {
14 class CodeCoverageHandler {
15 public:
16 static void Init();
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);
24 private:
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