зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1543009 - Move code coverage xpcom component to static registration. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D26893
This commit is contained in:
Родитель
8148056282
Коммит
d89350611b
|
@ -0,0 +1,14 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{93576af0-a62f-4c88-bc12-f1855d4e0173}',
|
||||
'contract_ids': ['@mozilla.org/tools/code-coverage;1'],
|
||||
'type': 'nsCodeCoverage',
|
||||
'headers': ['/tools/code-coverage/nsCodeCoverage.h']
|
||||
},
|
||||
]
|
|
@ -16,7 +16,10 @@ if CONFIG['MOZ_CODE_COVERAGE']:
|
|||
SOURCES += [
|
||||
'CodeCoverageHandler.cpp',
|
||||
'nsCodeCoverage.cpp',
|
||||
'nsCodeCoverageFactory.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
EXPORTS.mozilla += [
|
||||
|
|
|
@ -8,13 +8,6 @@
|
|||
|
||||
#include "nsICodeCoverage.h"
|
||||
|
||||
#define NS_CODECOVERAGE_CID \
|
||||
{ \
|
||||
0x93576af0, 0xa62f, 0x4c88, { \
|
||||
0xbc, 0x12, 0xf1, 0x85, 0x5d, 0x4e, 0x01, 0x73 \
|
||||
} \
|
||||
}
|
||||
|
||||
class nsCodeCoverage final : nsICodeCoverage {
|
||||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCodeCoverage.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCodeCoverage)
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_CODECOVERAGE_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kCodeCoverageCIDs[] = {
|
||||
{&kNS_CODECOVERAGE_CID, false, nullptr, nsCodeCoverageConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kCodeCoverageContracts[] = {
|
||||
{"@mozilla.org/tools/code-coverage;1", &kNS_CODECOVERAGE_CID}, {nullptr}};
|
||||
|
||||
extern const mozilla::Module kCodeCoverageModule = {
|
||||
mozilla::Module::kVersion, kCodeCoverageCIDs, kCodeCoverageContracts};
|
|
@ -366,9 +366,6 @@ extern const mozilla::Module kBrowserModule;
|
|||
#if defined(MOZ_LAYOUT_DEBUGGER) && !defined(MOZ_WIDGET_ANDROID)
|
||||
extern const mozilla::Module kLayoutDebugModule;
|
||||
#endif
|
||||
#if defined(MOZ_CODE_COVERAGE)
|
||||
extern const mozilla::Module kCodeCoverageModule;
|
||||
#endif
|
||||
|
||||
static nsTArray<const mozilla::Module*>* sExtraStaticModules;
|
||||
|
||||
|
@ -460,9 +457,6 @@ nsresult nsComponentManagerImpl::Init() {
|
|||
#if defined(MOZ_LAYOUT_DEBUGGER) && !defined(MOZ_WIDGET_ANDROID)
|
||||
RegisterModule(&kLayoutDebugModule);
|
||||
#endif
|
||||
#if defined(MOZ_CODE_COVERAGE)
|
||||
RegisterModule(&kCodeCoverageModule);
|
||||
#endif
|
||||
|
||||
for (uint32_t i = 0; i < sExtraStaticModules->Length(); ++i) {
|
||||
RegisterModule((*sExtraStaticModules)[i]);
|
||||
|
|
Загрузка…
Ссылка в новой задаче