Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/ipc/chromium/src/chrome/common/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  ipc_channel.cc

  Sprache: C
 

// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ipc_channel.h"

#include "base/message_loop.h"
#include "mozilla/ipc/ProtocolUtils.h"

#ifdef XP_WIN
#  include "chrome/common/ipc_channel_win.h"
#else
#  include "chrome/common/ipc_channel_posix.h"
#endif
#ifdef XP_DARWIN
#  include "chrome/common/ipc_channel_mach.h"
#endif

namespace IPC {

Channel::Channel()
    : chan_cap_("ChannelImpl::SendMutex",
                MessageLoopForIO::current()->SerialEventTarget()) {}

Channel::~Channel() = default;

already_AddRefed<Channel> Channel::Create(ChannelHandle pipe, Mode mode,
                                          base::ProcessId other_pid) {
  if (auto* handle = std::get_if<mozilla::UniqueFileHandle>(&pipe)) {
#ifdef XP_WIN
    return mozilla::MakeAndAddRef<ChannelWin>(std::move(*handle), mode,
                                              other_pid);
#else
    return mozilla::MakeAndAddRef<ChannelPosix>(std::move(*handle), mode,
                                                other_pid);
#endif
  }
#if XP_DARWIN
  if (auto* receive = std::get_if<mozilla::UniqueMachReceiveRight>(&pipe)) {
    return mozilla::MakeAndAddRef<ChannelMach>(std::move(*receive), nullptr,
                                               mode, other_pid);
  }
  if (auto* send = std::get_if<mozilla::UniqueMachSendRight>(&pipe)) {
    return mozilla::MakeAndAddRef<ChannelMach>(nullptr, std::move(*send), mode,
                                               other_pid);
  }
#endif
  MOZ_ASSERT_UNREACHABLE("unhandled pipe type");
  return nullptr;
}

}  // namespace IPC

Messung V0.5 in Prozent
C=89 H=99 G=94

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.