Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/ipc/glue/FileDescriptorSetChild.cpp
Line
Count
Source (jump to first uncovered line)
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 "FileDescriptorSetChild.h"
8
9
namespace mozilla {
10
namespace ipc {
11
12
FileDescriptorSetChild::FileDescriptorSetChild(
13
                                         const FileDescriptor& aFileDescriptor)
14
0
{
15
0
  mFileDescriptors.AppendElement(aFileDescriptor);
16
0
}
17
18
FileDescriptorSetChild::~FileDescriptorSetChild()
19
0
{
20
0
  MOZ_ASSERT(mFileDescriptors.IsEmpty());
21
0
}
22
23
void
24
FileDescriptorSetChild::ForgetFileDescriptors(
25
                                    nsTArray<FileDescriptor>& aFileDescriptors)
26
0
{
27
0
  aFileDescriptors.Clear();
28
0
  mFileDescriptors.SwapElements(aFileDescriptors);
29
0
}
30
31
mozilla::ipc::IPCResult
32
FileDescriptorSetChild::RecvAddFileDescriptor(
33
                                         const FileDescriptor& aFileDescriptor)
34
0
{
35
0
  mFileDescriptors.AppendElement(aFileDescriptor);
36
0
  return IPC_OK();
37
0
}
38
39
} // namespace ipc
40
} // namespace mozilla