tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

CrossProcessSemaphore_unimplemented.cpp (1913B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #include "CrossProcessSemaphore.h"
      8 
      9 #include "nsDebug.h"
     10 
     11 namespace mozilla {
     12 
     13 /* static */
     14 CrossProcessSemaphore* CrossProcessSemaphore::Create(const char*, uint32_t) {
     15  MOZ_CRASH("Cross-process semaphores not allowed on this platform.");
     16  return nullptr;
     17 }
     18 
     19 /* static */
     20 CrossProcessSemaphore* CrossProcessSemaphore::Create(
     21    CrossProcessSemaphoreHandle) {
     22  MOZ_CRASH("Cross-process semaphores not allowed on this platform.");
     23  return nullptr;
     24 }
     25 
     26 CrossProcessSemaphore::CrossProcessSemaphore() {
     27  MOZ_CRASH(
     28      "Cross-process semaphores not allowed on this platform - woah! We "
     29      "should've aborted by now!");
     30 }
     31 
     32 CrossProcessSemaphore::~CrossProcessSemaphore() {
     33  MOZ_CRASH(
     34      "Cross-process semaphores not allowed on this platform - woah! We "
     35      "should've aborted by now!");
     36 }
     37 
     38 bool CrossProcessSemaphore::Wait(const Maybe<TimeDuration>& aWaitTime) {
     39  MOZ_CRASH(
     40      "Cross-process semaphores not allowed on this platform - woah! We "
     41      "should've aborted by now!");
     42  return false;
     43 }
     44 
     45 void CrossProcessSemaphore::Signal() {
     46  MOZ_CRASH(
     47      "Cross-process semaphores not allowed on this platform - woah! We "
     48      "should've aborted by now!");
     49 }
     50 
     51 CrossProcessSemaphoreHandle CrossProcessSemaphore::CloneHandle() {
     52  MOZ_CRASH(
     53      "Cross-process semaphores not allowed on this platform - woah! We "
     54      "should've aborted by now!");
     55  return 0;
     56 }
     57 
     58 void CrossProcessSemaphore::CloseHandle() {
     59  MOZ_CRASH(
     60      "Cross-process semaphores not allowed on this platform - woah! We "
     61      "should've aborted by now!");
     62 }
     63 
     64 }  // namespace mozilla