/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* 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/. */
void RegisterRuntimeExceptionModule() { #ifdef XP_WIN # ifdefined(DEBUG) // In debug builds, disable the crash reporter by default, and allow to // enable it with the MOZ_CRASHREPORTER environment variable. constchar* envvar = getenv("MOZ_CRASHREPORTER"); if (!envvar || !*envvar) { return;
} # else // In other builds, enable the crash reporter by default, and allow // disabling it with the MOZ_CRASHREPORTER_DISABLE environment variable. constchar* envvar = getenv("MOZ_CRASHREPORTER_DISABLE"); if (envvar && *envvar) { return;
} # endif
// If sModulePath is set we have already registerd the module. if (*sModulePath) { return;
}
// If we fail to get the path just return. if (!GetRuntimeExceptionModulePath(sModulePath, kModulePathLength)) { return;
}
if (FAILED(::WerRegisterRuntimeExceptionModule(
sModulePath, reinterpret_cast<PVOID>(mozilla::GetGeckoProcessType())))) { // The registration failed null out sModulePath to record this.
*sModulePath = L'\0'; return;
} #endif// XP_WIN
}
void UnregisterRuntimeExceptionModule() { #ifdef XP_WIN // If sModulePath is set then we have registered the module. if (*sModulePath) {
Unused << ::WerUnregisterRuntimeExceptionModule(
sModulePath, reinterpret_cast<PVOID>(mozilla::GetGeckoProcessType()));
*sModulePath = L'\0';
} #endif// XP_WIN
}
} // namespace CrashReporter
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.