mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-27 09:37:31 +09:00
Remove base conditional code for crash reporter and injector.
This commit is contained in:
parent
87fa26d31e
commit
434f3590e3
131 changed files with 39 additions and 4139 deletions
|
|
@ -18,12 +18,6 @@
|
|||
#import <IOKit/IOKitLib.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsICrashReporter.h"
|
||||
#define NS_CRASHREPORTER_CONTRACTID "@mozilla.org/toolkit/crash-reporter;1"
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::widget;
|
||||
|
||||
|
|
@ -273,33 +267,7 @@ GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
|
|||
void
|
||||
GfxInfo::AddCrashReportAnnotations()
|
||||
{
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
nsString deviceID, vendorID, driverVersion;
|
||||
nsAutoCString narrowDeviceID, narrowVendorID, narrowDriverVersion;
|
||||
|
||||
GetAdapterDeviceID(deviceID);
|
||||
CopyUTF16toUTF8(deviceID, narrowDeviceID);
|
||||
GetAdapterVendorID(vendorID);
|
||||
CopyUTF16toUTF8(vendorID, narrowVendorID);
|
||||
GetAdapterDriverVersion(driverVersion);
|
||||
CopyUTF16toUTF8(driverVersion, narrowDriverVersion);
|
||||
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterVendorID"),
|
||||
narrowVendorID);
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDeviceID"),
|
||||
narrowDeviceID);
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDriverVersion"),
|
||||
narrowDriverVersion);
|
||||
/* Add an App Note for now so that we get the data immediately. These
|
||||
* can go away after we store the above in the socorro db */
|
||||
nsAutoCString note;
|
||||
/* AppendPrintf only supports 32 character strings, mrghh. */
|
||||
note.Append("AdapterVendorID: ");
|
||||
note.Append(narrowVendorID);
|
||||
note.Append(", AdapterDeviceID: ");
|
||||
note.Append(narrowDeviceID);
|
||||
CrashReporter::AppendAppNotesToCrashReport(note);
|
||||
#endif
|
||||
/*** STUB ***/
|
||||
}
|
||||
|
||||
// We don't support checking driver versions on Mac.
|
||||
|
|
|
|||
|
|
@ -77,9 +77,6 @@
|
|||
#include "nsAccessibilityService.h"
|
||||
#include "mozilla/a11y/Platform.h"
|
||||
#endif
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
|
|
@ -5373,31 +5370,14 @@ GetIntegerDeltaForEvent(NSEvent* aEvent)
|
|||
#if !defined(RELEASE_OR_BETA) || defined(DEBUG)
|
||||
if (!Preferences::GetBool("intl.allow-insecure-text-input", false) &&
|
||||
mGeckoChild && mTextInputHandler && mTextInputHandler->IsFocused()) {
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
NSWindow* window = [self window];
|
||||
NSString* info = [NSString stringWithFormat:@"\nview [%@], window [%@], window is key %i, is fullscreen %i, app is active %i",
|
||||
self, window, [window isKeyWindow], ([window styleMask] & (1 << 14)) != 0,
|
||||
[NSApp isActive]];
|
||||
nsAutoCString additionalInfo([info UTF8String]);
|
||||
#endif
|
||||
if (mGeckoChild->GetInputContext().IsPasswordEditor() &&
|
||||
!TextInputHandler::IsSecureEventInputEnabled()) {
|
||||
#define CRASH_MESSAGE "A password editor has focus, but not in secure input mode"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("\nBug 893973: ") +
|
||||
NS_LITERAL_CSTRING(CRASH_MESSAGE));
|
||||
CrashReporter::AppendAppNotesToCrashReport(additionalInfo);
|
||||
#endif
|
||||
MOZ_CRASH(CRASH_MESSAGE);
|
||||
#undef CRASH_MESSAGE
|
||||
} else if (!mGeckoChild->GetInputContext().IsPasswordEditor() &&
|
||||
TextInputHandler::IsSecureEventInputEnabled()) {
|
||||
#define CRASH_MESSAGE "A non-password editor has focus, but in secure input mode"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("\nBug 893973: ") +
|
||||
NS_LITERAL_CSTRING(CRASH_MESSAGE));
|
||||
CrashReporter::AppendAppNotesToCrashReport(additionalInfo);
|
||||
#endif
|
||||
MOZ_CRASH(CRASH_MESSAGE);
|
||||
#undef CRASH_MESSAGE
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue