Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/gfx/vr/ipc/VRProcessChild.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 "VRProcessChild.h"
8
9
#include "mozilla/BackgroundHangMonitor.h"
10
#include "mozilla/ipc/IOThreadChild.h"
11
12
13
using namespace mozilla;
14
using namespace mozilla::gfx;
15
using mozilla::ipc::IOThreadChild;
16
17
18
VRProcessChild::VRProcessChild(ProcessId aParentPid)
19
  : ProcessChild(aParentPid)
20
#if defined(aParentPid)
21
  , mVR(nullptr)
22
#endif
23
0
{
24
0
}
25
26
VRProcessChild::~VRProcessChild()
27
0
{
28
0
}
29
30
bool
31
VRProcessChild::Init(int aArgc, char* aArgv[])
32
0
{
33
0
  BackgroundHangMonitor::Startup();
34
0
35
0
  char* parentBuildID = nullptr;
36
0
  for (int i = 1; i < aArgc; i++) {
37
0
    if (strcmp(aArgv[i], "-parentBuildID") == 0) {
38
0
      parentBuildID = aArgv[i + 1];
39
0
    }
40
0
  }
41
0
42
0
  mVR.Init(ParentPid(), parentBuildID,
43
0
           IOThreadChild::message_loop(),
44
0
           IOThreadChild::channel());
45
0
46
0
  return true;
47
0
}
48
49
void
50
VRProcessChild::CleanUp()
51
0
{
52
0
  NS_ShutdownXPCOM(nullptr);
53
0
}