Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/tools/fuzzing/ipc/ProtocolFuzzer.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=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 file,
5
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#include "ProtocolFuzzer.h"
8
9
namespace mozilla {
10
namespace ipc {
11
12
nsTArray<nsCString>
13
LoadIPCMessageBlacklist(const char* aPath)
14
0
{
15
0
  nsTArray<nsCString> blacklist;
16
0
  if (aPath) {
17
0
    nsresult result = Faulty::ReadFile(aPath, blacklist);
18
0
    MOZ_RELEASE_ASSERT(result == NS_OK);
19
0
  }
20
0
  return blacklist;
21
0
}
22
23
24
mozilla::dom::ContentParent*
25
ProtocolFuzzerHelper::CreateContentParent(mozilla::dom::ContentParent* aOpener,
26
                                          const nsAString& aRemoteType)
27
0
{
28
0
  auto* cp = new mozilla::dom::ContentParent(aOpener, aRemoteType);
29
0
  // TODO: this duplicates MessageChannel::Open
30
0
  cp->GetIPCChannel()->mWorkerThread = GetCurrentVirtualThread();
31
0
  cp->GetIPCChannel()->mMonitor = new RefCountedMonitor();
32
0
  return cp;
33
0
}
34
}
35
}