Commit 0c958444 authored by Razvan Maries's avatar Razvan Maries
Browse files

Backed out 2 changesets (bug 1635494) for Windows build bustages. CLOSED TREE

Backed out changeset 14456b365a11 (bug 1635494)
Backed out changeset 2608db2fa8be (bug 1635494)
parent 23a4c410
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -1994,7 +1994,6 @@ dependencies = [
 "nserror",
 "nsstring",
 "prefs_parser",
 "processtools",
 "profiler_helper",
 "remote",
 "rlbox_lucet_sandbox",
@@ -3825,16 +3824,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f566249236c6ca4340f7ca78968271f0ed2b0f234007a61b66f9ecd0af09260"

[[package]]
name = "processtools"
version = "0.1.0"
dependencies = [
 "libc",
 "nserror",
 "winapi 0.3.7",
 "xpcom",
]

[[package]]
name = "profiler_helper"
version = "0.1.0"
+0 −1
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ DIRS += [
    'perfmonitoring',
    'pictureinpicture',
    'places',
    'processtools',
    'processsingleton',
    'promiseworker',
    'prompts',
+0 −14
Original line number Diff line number Diff line
[package]
name = "processtools"
version = "0.1.0"
authors = ["David Teller <dteller@mozilla.com>"]

[dependencies]
nserror = { path = "../../../xpcom/rust/nserror" }
xpcom = { path = "../../../xpcom/rust/xpcom" }

[target.'cfg(windows)'.dependencies]
winapi = "0.3.7"

[target.'cfg(unix)'.dependencies]
libc = "0.2"
+0 −33
Original line number Diff line number Diff line
/* 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/ClearOnShutdown.h"
#include "mozilla/StaticPtr.h"
#include "nsCOMPtr.h"
#include "ProcessToolsService.h"

// This anonymous namespace prevents outside C++ code from improperly accessing
// these implementation details.
namespace {
extern "C" {
// Implemented in Rust.
void new_process_tools_service(nsIProcessToolsService** result);
}

static mozilla::StaticRefPtr<nsIProcessToolsService> sProcessToolsService;
}  // namespace

already_AddRefed<nsIProcessToolsService> GetProcessToolsService() {
  nsCOMPtr<nsIProcessToolsService> processToolsService;

  if (sProcessToolsService) {
    processToolsService = sProcessToolsService;
  } else {
    new_process_tools_service(getter_AddRefs(processToolsService));
    sProcessToolsService = processToolsService;
    mozilla::ClearOnShutdown(&sProcessToolsService);
  }

  return processToolsService.forget();
}
+0 −8
Original line number Diff line number Diff line
/* -*- Mode: C++; tab-width: 2; 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 "nsIProcessToolsService.h"

already_AddRefed<nsIProcessToolsService> GetProcessToolsService();
 No newline at end of file
Loading