Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/parser/htmlparser/nsParserModule.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* This Source Code Form is subject to the terms of the Mozilla Public
3
 * License, v. 2.0. If a copy of the MPL was not distributed with this
4
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6
#include "mozilla/ModuleUtils.h"
7
#include "nsParser.h"
8
#include "nsParserCIID.h"
9
#include "nsHTMLTags.h"
10
#include "nsSAXXMLReader.h"
11
12
//----------------------------------------------------------------------
13
14
NS_GENERIC_FACTORY_CONSTRUCTOR(nsParser)
15
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSAXXMLReader)
16
17
NS_DEFINE_NAMED_CID(NS_PARSER_CID);
18
NS_DEFINE_NAMED_CID(NS_SAXXMLREADER_CID);
19
20
static const mozilla::Module::CIDEntry kParserCIDs[] = {
21
  { &kNS_PARSER_CID, false, nullptr, nsParserConstructor },
22
  { &kNS_SAXXMLREADER_CID, false, nullptr, nsSAXXMLReaderConstructor },
23
  { nullptr }
24
};
25
26
static const mozilla::Module::ContractIDEntry kParserContracts[] = {
27
  { NS_SAXXMLREADER_CONTRACTID, &kNS_SAXXMLREADER_CID },
28
  { nullptr }
29
};
30
31
static nsresult
32
Initialize()
33
0
{
34
0
  nsresult rv = nsHTMLTags::AddRefTable();
35
0
  NS_ENSURE_SUCCESS(rv, rv);
36
0
37
#ifdef DEBUG
38
  CheckElementTable();
39
  nsHTMLTags::TestTagTable();
40
#endif
41
42
0
  return rv;
43
0
}
44
45
static void
46
Shutdown()
47
0
{
48
0
  nsHTMLTags::ReleaseTable();
49
0
}
50
51
static mozilla::Module kParserModule = {
52
  mozilla::Module::kVersion,
53
  kParserCIDs,
54
  kParserContracts,
55
  nullptr,
56
  nullptr,
57
  Initialize,
58
  Shutdown
59
};
60
61
NSMODULE_DEFN(nsParserModule) = &kParserModule;