Coverage Report

Created: 2018-09-25 14:53

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