forked from mirrors/gecko-dev
Bug 1402519 - Remove MOZ_CRASHREPORTER directives from widget; r=froydnj
--HG-- extra : rebase_source : 4472a8d6ce5edf1b5a4665d522a1816020308a43
This commit is contained in:
parent
52fcc3bed8
commit
cbb30621ec
14 changed files with 50 additions and 108 deletions
|
|
@ -15,9 +15,7 @@
|
|||
#include "mozilla/TextComposition.h"
|
||||
#include "mozilla/TextEvents.h"
|
||||
#include "mozilla/dom/TabParent.h"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif // #ifdef MOZ_CRASHREPORTER
|
||||
#include "nsIWidget.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
|
@ -1113,7 +1111,7 @@ ContentCacheInParent::OnCompositionEvent(const WidgetCompositionEvent& aEvent)
|
|||
GetBoolName(mWidgetHasComposition), mPendingCompositionCount,
|
||||
mCommitStringByRequest));
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mDispatchedEventMessages.AppendElement(aEvent.mMessage);
|
||||
#endif // #ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
|
||||
|
|
@ -1193,9 +1191,9 @@ ContentCacheInParent::OnSelectionEvent(
|
|||
GetBoolName(aSelectionEvent.mUseNativeLineBreak), mPendingEventsNeedingAck,
|
||||
GetBoolName(mWidgetHasComposition), mPendingCompositionCount));
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mDispatchedEventMessages.AppendElement(aSelectionEvent.mMessage);
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
|
||||
mPendingEventsNeedingAck++;
|
||||
}
|
||||
|
|
@ -1212,27 +1210,27 @@ ContentCacheInParent::OnEventNeedingAckHandled(nsIWidget* aWidget,
|
|||
"aMessage=%s), mPendingEventsNeedingAck=%u, mPendingCompositionCount=%" PRIu8,
|
||||
this, aWidget, ToChar(aMessage), mPendingEventsNeedingAck, mPendingCompositionCount));
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mReceivedEventMessages.AppendElement(aMessage);
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
|
||||
if (WidgetCompositionEvent::IsFollowedByCompositionEnd(aMessage) ||
|
||||
aMessage == eCompositionCommitRequestHandled) {
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
if (mPendingCompositionCount == 1) {
|
||||
RemoveUnnecessaryEventMessageLog();
|
||||
}
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
|
||||
if (NS_WARN_IF(!mPendingCompositionCount)) {
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
nsPrintfCString info("\nThere is no pending composition but received %s "
|
||||
"message from the remote child\n\n",
|
||||
ToChar(aMessage));
|
||||
AppendEventMessageLog(info);
|
||||
CrashReporter::AppendAppNotesToCrashReport(info);
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
MOZ_DIAGNOSTIC_ASSERT(false,
|
||||
"No pending composition but received unexpected commit event");
|
||||
mPendingCompositionCount = 1;
|
||||
|
|
@ -1254,13 +1252,13 @@ ContentCacheInParent::OnEventNeedingAckHandled(nsIWidget* aWidget,
|
|||
}
|
||||
|
||||
if (NS_WARN_IF(!mPendingEventsNeedingAck)) {
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
nsPrintfCString info("\nThere is no pending events but received %s "
|
||||
"message from the remote child\n\n",
|
||||
ToChar(aMessage));
|
||||
AppendEventMessageLog(info);
|
||||
CrashReporter::AppendAppNotesToCrashReport(info);
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
MOZ_DIAGNOSTIC_ASSERT(false,
|
||||
"No pending event message but received unexpected event");
|
||||
mPendingEventsNeedingAck = 1;
|
||||
|
|
@ -1294,11 +1292,11 @@ ContentCacheInParent::RequestIMEToCommitComposition(nsIWidget* aWidget,
|
|||
// composition events for cleaning up TextComposition and handle the
|
||||
// request as it's handled asynchronously.
|
||||
if (mPendingCompositionCount > 1) {
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mRequestIMEToCommitCompositionResults.
|
||||
AppendElement(RequestIMEToCommitCompositionResult::
|
||||
eToOldCompositionReceived);
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1308,11 +1306,11 @@ ContentCacheInParent::RequestIMEToCommitComposition(nsIWidget* aWidget,
|
|||
// TextComposition. So, this shouldn't do nothing and TextComposition
|
||||
// should handle the request as it's handled asynchronously.
|
||||
if (mIsPendingLastCommitEvent) {
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mRequestIMEToCommitCompositionResults.
|
||||
AppendElement(RequestIMEToCommitCompositionResult::
|
||||
eToCommittedCompositionReceived);
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1321,11 +1319,11 @@ ContentCacheInParent::RequestIMEToCommitComposition(nsIWidget* aWidget,
|
|||
if (!IMEStateManager::DoesTabParentHaveIMEFocus(&mTabParent)) {
|
||||
// Use the latest composition string which may not be handled in the
|
||||
// remote process for avoiding data loss.
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mRequestIMEToCommitCompositionResults.
|
||||
AppendElement(RequestIMEToCommitCompositionResult::
|
||||
eReceivedAfterTabParentBlur);
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
aCommittedString = mCompositionString;
|
||||
// After we return true from here, i.e., without actually requesting IME
|
||||
// to commit composition, we will receive eCompositionCommitRequestHandled
|
||||
|
|
@ -1341,11 +1339,11 @@ ContentCacheInParent::RequestIMEToCommitComposition(nsIWidget* aWidget,
|
|||
MOZ_LOG(sContentCacheLog, LogLevel::Warning,
|
||||
(" 0x%p RequestToCommitComposition(), "
|
||||
"does nothing due to no composition", this));
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mRequestIMEToCommitCompositionResults.
|
||||
AppendElement(RequestIMEToCommitCompositionResult::
|
||||
eReceivedButNoTextComposition);
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1376,11 +1374,11 @@ ContentCacheInParent::RequestIMEToCommitComposition(nsIWidget* aWidget,
|
|||
// normally. On the other hand, TextComposition instance in the remote
|
||||
// process won't dispatch following composition events and will be
|
||||
// destroyed by IMEStateManager::DispatchCompositionEvent().
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mRequestIMEToCommitCompositionResults.
|
||||
AppendElement(RequestIMEToCommitCompositionResult::
|
||||
eHandledAsynchronously);
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1392,10 +1390,10 @@ ContentCacheInParent::RequestIMEToCommitComposition(nsIWidget* aWidget,
|
|||
// IMEStateManager::DispatchCompositionEvent() at receiving the
|
||||
// eCompositionCommit event (Note that TextComposition instance in this
|
||||
// process was already destroyed).
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
mRequestIMEToCommitCompositionResults.
|
||||
AppendElement(RequestIMEToCommitCompositionResult::eHandledSynchronously);
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1492,7 +1490,7 @@ ContentCacheInParent::FlushPendingNotifications(nsIWidget* aWidget)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
|
||||
void
|
||||
ContentCacheInParent::RemoveUnnecessaryEventMessageLog()
|
||||
|
|
@ -1581,7 +1579,7 @@ ContentCacheInParent::AppendEventMessageLog(nsACString& aLog) const
|
|||
aLog.AppendLiteral("\n");
|
||||
}
|
||||
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
|
||||
/*****************************************************************************
|
||||
* mozilla::ContentCache::TextRectArray
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ private:
|
|||
IMENotification mPendingLayoutChange;
|
||||
IMENotification mPendingCompositionUpdate;
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
// Log of event messages to be output to crash report.
|
||||
nsTArray<EventMessage> mDispatchedEventMessages;
|
||||
nsTArray<EventMessage> mReceivedEventMessages;
|
||||
|
|
@ -450,7 +450,7 @@ private:
|
|||
}
|
||||
nsTArray<RequestIMEToCommitCompositionResult>
|
||||
mRequestIMEToCommitCompositionResults;
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
|
||||
// mTabParent is owner of the instance.
|
||||
dom::TabParent& MOZ_NON_OWNING_REF mTabParent;
|
||||
|
|
@ -507,7 +507,7 @@ private:
|
|||
|
||||
void FlushPendingNotifications(nsIWidget* aWidget);
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
/**
|
||||
* Remove unnecessary messages from mDispatchedEventMessages and
|
||||
* mReceivedEventMessages.
|
||||
|
|
@ -518,7 +518,7 @@ private:
|
|||
* Append event message log to aLog.
|
||||
*/
|
||||
void AppendEventMessageLog(nsACString& aLog) const;
|
||||
#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
|
|
@ -38,10 +38,6 @@
|
|||
#include "gfxConfig.h"
|
||||
#include "DriverCrashGuard.h"
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
using namespace mozilla::widget;
|
||||
using namespace mozilla;
|
||||
using mozilla::MutexAutoLock;
|
||||
|
|
|
|||
|
|
@ -11,14 +11,12 @@
|
|||
#include <errno.h>
|
||||
#include <sys/utsname.h>
|
||||
#include "nsCRTGlue.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsICrashReporter.h"
|
||||
#include "prenv.h"
|
||||
|
||||
#include "GfxInfoX11.h"
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsICrashReporter.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace widget {
|
||||
|
|
@ -176,9 +174,8 @@ GfxInfo::GetData()
|
|||
mAdapterDescription.Append(nsDependentCString(buf));
|
||||
mAdapterDescription.Append('\n');
|
||||
}
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
|
||||
CrashReporter::AppendAppNotesToCrashReport(mAdapterDescription);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -194,9 +191,8 @@ GfxInfo::GetData()
|
|||
if (mHasTextureFromPixmap)
|
||||
note.AppendLiteral(" -- texture_from_pixmap");
|
||||
note.Append('\n');
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
|
||||
CrashReporter::AppendAppNotesToCrashReport(note);
|
||||
#endif
|
||||
|
||||
// determine the major OpenGL version. That's the first integer in the version string.
|
||||
mGLMajorVersion = strtol(mVersion.get(), 0, 10);
|
||||
|
|
|
|||
|
|
@ -8,17 +8,15 @@
|
|||
#include "GLContextProvider.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "prenv.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsICrashReporter.h"
|
||||
#include "nsVersionComparator.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsICrashReporter.h"
|
||||
#define NS_CRASHREPORTER_CONTRACTID "@mozilla.org/toolkit/crash-reporter;1"
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace widget {
|
||||
|
|
@ -350,7 +348,6 @@ GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
|
|||
void
|
||||
GfxInfo::AddCrashReportAnnotations()
|
||||
{
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterVendorID"),
|
||||
mGLStrings->Vendor());
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDeviceID"),
|
||||
|
|
@ -364,7 +361,6 @@ GfxInfo::AddCrashReportAnnotations()
|
|||
note.AppendPrintf("AdapterDescription: '%s'\n", mAdapterDescription.get());
|
||||
|
||||
CrashReporter::AppendAppNotesToCrashReport(note);
|
||||
#endif
|
||||
}
|
||||
|
||||
const nsTArray<GfxDriverInfo>&
|
||||
|
|
|
|||
|
|
@ -9,10 +9,7 @@
|
|||
#include "GeneratedJNIWrappers.h"
|
||||
#include "AndroidBuild.h"
|
||||
#include "nsAppShell.h"
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace jni {
|
||||
|
|
@ -206,7 +203,6 @@ bool ReportException(JNIEnv* aEnv, jthrowable aExc, jstring aStack)
|
|||
{
|
||||
bool result = true;
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
result &= NS_SUCCEEDED(CrashReporter::AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("JavaStackTrace"),
|
||||
String::Ref::From(aStack)->ToCString()));
|
||||
|
|
@ -219,7 +215,6 @@ bool ReportException(JNIEnv* aEnv, jthrowable aExc, jstring aStack)
|
|||
CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("\n") +
|
||||
appNotes->ToCString());
|
||||
}
|
||||
#endif // MOZ_CRASHREPORTER
|
||||
|
||||
if (sOOMErrorClass && aEnv->IsInstanceOf(aExc, sOOMErrorClass)) {
|
||||
NS_ABORT_OOM(0); // Unknown OOM size
|
||||
|
|
|
|||
|
|
@ -9,11 +9,13 @@
|
|||
#include "base/message_loop.h"
|
||||
#include "base/task.h"
|
||||
#include "mozilla/Hal.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsIScreen.h"
|
||||
#include "nsIScreenManager.h"
|
||||
#include "nsWindow.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsICommandLineRunner.h"
|
||||
#include "nsICrashReporter.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIAppStartup.h"
|
||||
#include "nsIGeolocationProvider.h"
|
||||
|
|
@ -58,11 +60,6 @@
|
|||
#include "mozilla/Logging.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsICrashReporter.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
#include "AndroidAlerts.h"
|
||||
#include "AndroidUiThread.h"
|
||||
#include "ANRReporter.h"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@
|
|||
|
||||
#include "GfxInfo.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsCocoaFeatures.h"
|
||||
#include "nsICrashReporter.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include <algorithm>
|
||||
|
||||
|
|
@ -18,11 +20,7 @@
|
|||
#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;
|
||||
|
|
@ -275,7 +273,6 @@ GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
|
|||
void
|
||||
GfxInfo::AddCrashReportAnnotations()
|
||||
{
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
nsString deviceID, vendorID, driverVersion;
|
||||
nsAutoCString narrowDeviceID, narrowVendorID, narrowDriverVersion;
|
||||
|
||||
|
|
@ -301,7 +298,6 @@ GfxInfo::AddCrashReportAnnotations()
|
|||
note.AppendLiteral(", AdapterDeviceID: ");
|
||||
note.Append(narrowDeviceID);
|
||||
CrashReporter::AppendAppNotesToCrashReport(note);
|
||||
#endif
|
||||
}
|
||||
|
||||
// We don't support checking driver versions on Mac.
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "mozilla/TouchEvents.h"
|
||||
|
||||
#include "nsArrayUtils.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsObjCExceptions.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
|
@ -83,9 +84,6 @@
|
|||
#include "nsAccessibilityService.h"
|
||||
#include "mozilla/a11y/Platform.h"
|
||||
#endif
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
|
|
@ -5519,31 +5517,30 @@ 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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@
|
|||
#include "base/message_loop.h"
|
||||
|
||||
#include "nsBaseAppShell.h"
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
|
@ -320,18 +318,14 @@ void
|
|||
nsBaseAppShell::IncrementEventloopNestingLevel()
|
||||
{
|
||||
++mEventloopNestingLevel;
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
CrashReporter::SetEventloopNestingLevel(mEventloopNestingLevel);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
nsBaseAppShell::DecrementEventloopNestingLevel()
|
||||
{
|
||||
--mEventloopNestingLevel;
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
CrashReporter::SetEventloopNestingLevel(mEventloopNestingLevel);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Called from the main thread
|
||||
|
|
|
|||
|
|
@ -18,15 +18,13 @@
|
|||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/gfx/DeviceManagerDx.h"
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsICrashReporter.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "jsapi.h"
|
||||
#include <intrin.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::gfx;
|
||||
|
|
@ -854,7 +852,6 @@ GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
/* Cisco's VPN software can cause corruption of the floating point state.
|
||||
* Make a note of this in our crash reports so that some weird crashes
|
||||
* make more sense */
|
||||
|
|
@ -869,12 +866,10 @@ CheckForCiscoVPN() {
|
|||
CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("Cisco VPN\n"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
GfxInfo::AddCrashReportAnnotations()
|
||||
{
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
CheckForCiscoVPN();
|
||||
|
||||
if (mHasDriverVersionMismatch) {
|
||||
|
|
@ -954,8 +949,6 @@ GfxInfo::AddCrashReportAnnotations()
|
|||
note.Append(NS_LossyConvertUTF16toASCII(adapterDriverVersionString2));
|
||||
}
|
||||
CrashReporter::AppendAppNotesToCrashReport(note);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
static OperatingSystem
|
||||
|
|
|
|||
|
|
@ -12,9 +12,7 @@
|
|||
#include "mozilla/TextEvents.h"
|
||||
|
||||
#include "nsAlgorithm.h"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIIdleServiceInternal.h"
|
||||
#include "nsIWindowsRegKey.h"
|
||||
|
|
@ -2696,8 +2694,6 @@ NativeKey::NeedsToHandleWithoutFollowingCharMessages() const
|
|||
return mIsPrintableKey;
|
||||
}
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
|
||||
static nsCString
|
||||
GetResultOfInSendMessageEx()
|
||||
{
|
||||
|
|
@ -2730,8 +2726,6 @@ GetResultOfInSendMessageEx()
|
|||
return result;
|
||||
}
|
||||
|
||||
#endif // #ifdef MOZ_CRASHREPORTER
|
||||
|
||||
bool
|
||||
NativeKey::MayBeSameCharMessage(const MSG& aCharMsg1,
|
||||
const MSG& aCharMsg2) const
|
||||
|
|
@ -2975,7 +2969,6 @@ NativeKey::GetFollowingCharMessage(MSG& aCharMsg)
|
|||
}
|
||||
|
||||
if (doCrash) {
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
nsPrintfCString info("\nPeekMessage() failed to remove char message! "
|
||||
"\nActive keyboard layout=0x%08X (%s), "
|
||||
"\nHandling message: %s, InSendMessageEx()=%s, "
|
||||
|
|
@ -3001,7 +2994,7 @@ NativeKey::GetFollowingCharMessage(MSG& aCharMsg)
|
|||
CrashReporter::AppendAppNotesToCrashReport(
|
||||
NS_LITERAL_CSTRING("\nThere is no message in any window"));
|
||||
}
|
||||
#endif // #ifdef MOZ_CRASHREPORTER
|
||||
|
||||
MOZ_CRASH("We lost the following char message");
|
||||
}
|
||||
|
||||
|
|
@ -3120,7 +3113,6 @@ NativeKey::GetFollowingCharMessage(MSG& aCharMsg)
|
|||
"nextKeyMsg=%s, kFoundCharMsg=%s",
|
||||
this, ToString(removedMsg).get(), ToString(nextKeyMsg).get(),
|
||||
ToString(kFoundCharMsg).get()));
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
nsPrintfCString info("\nPeekMessage() removed unexpcted char message! "
|
||||
"\nActive keyboard layout=0x%08X (%s), "
|
||||
"\nHandling message: %s, InSendMessageEx()=%s, "
|
||||
|
|
@ -3158,14 +3150,13 @@ NativeKey::GetFollowingCharMessage(MSG& aCharMsg)
|
|||
CrashReporter::AppendAppNotesToCrashReport(
|
||||
NS_LITERAL_CSTRING("\nThere is no key message in any windows."));
|
||||
}
|
||||
#endif // #ifdef MOZ_CRASHREPORTER
|
||||
|
||||
MOZ_CRASH("PeekMessage() removed unexpected message");
|
||||
}
|
||||
MOZ_LOG(sNativeKeyLogger, LogLevel::Error,
|
||||
("%p NativeKey::GetFollowingCharMessage(), FAILED, removed messages "
|
||||
"are all WM_NULL, nextKeyMsg=%s",
|
||||
this, ToString(nextKeyMsg).get()));
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
nsPrintfCString info("\nWe lost following char message! "
|
||||
"\nActive keyboard layout=0x%08X (%s), "
|
||||
"\nHandling message: %s, InSendMessageEx()=%s, \n"
|
||||
|
|
@ -3176,7 +3167,6 @@ NativeKey::GetFollowingCharMessage(MSG& aCharMsg)
|
|||
GetResultOfInSendMessageEx().get(),
|
||||
ToString(kFoundCharMsg).get());
|
||||
CrashReporter::AppendAppNotesToCrashReport(info);
|
||||
#endif // #ifdef MOZ_CRASHREPORTER
|
||||
MOZ_CRASH("We lost the following char message");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ UNIFIED_SOURCES += [
|
|||
'InProcessWinCompositorWidget.cpp',
|
||||
'JumpListItem.cpp',
|
||||
'KeyboardLayout.cpp',
|
||||
'LSPAnnotator.cpp',
|
||||
'nsAppShell.cpp',
|
||||
'nsClipboard.cpp',
|
||||
'nsColorPicker.cpp',
|
||||
|
|
@ -87,11 +88,6 @@ SOURCES += [
|
|||
'WinMouseScrollHandler.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_CRASHREPORTER']:
|
||||
UNIFIED_SOURCES += [
|
||||
'LSPAnnotator.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['NS_PRINTING']:
|
||||
UNIFIED_SOURCES += [
|
||||
'nsDeviceContextSpecWin.cpp',
|
||||
|
|
|
|||
|
|
@ -164,9 +164,7 @@ nsAppShell::~nsAppShell()
|
|||
nsresult
|
||||
nsAppShell::Init()
|
||||
{
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
LSPAnnotate();
|
||||
#endif
|
||||
|
||||
mLastNativeEventScheduled = TimeStamp::NowLoRes();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue