Bug 1402519 - Remove MOZ_CRASHREPORTER directives from widget; r=froydnj
authorGabriele Svelto <gsvelto@mozilla.com>
Thu, 23 Nov 2017 10:59:04 +0100
changeset 447810 dfab473522a879041329425a4d19f31b1ecefce4
parent 447809 9227bf4929f8d23f2632196ddc410b5b638213b4
child 447811 5bd0686052829656cd02ed55f5cd16c29f4894b7
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1402519
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1402519 - Remove MOZ_CRASHREPORTER directives from widget; r=froydnj
widget/ContentCache.cpp
widget/ContentCache.h
widget/GfxInfoBase.cpp
widget/GfxInfoX11.cpp
widget/android/GfxInfo.cpp
widget/android/jni/Utils.cpp
widget/android/nsAppShell.cpp
widget/cocoa/GfxInfo.mm
widget/cocoa/nsChildView.mm
widget/nsBaseAppShell.cpp
widget/windows/GfxInfo.cpp
widget/windows/KeyboardLayout.cpp
widget/windows/moz.build
widget/windows/nsAppShell.cpp
--- a/widget/ContentCache.cpp
+++ b/widget/ContentCache.cpp
@@ -10,19 +10,17 @@
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/IntegerPrintfMacros.h"
 #include "mozilla/Logging.h"
 #include "mozilla/Move.h"
 #include "mozilla/RefPtr.h"
 #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 {
 
 using namespace dom;
 using namespace widget;
 
 static const char*
@@ -1108,17 +1106,17 @@ ContentCacheInParent::OnCompositionEvent
      "mPendingEventsNeedingAck=%u, mWidgetHasComposition=%s, "
      "mPendingCompositionCount=%u, mCommitStringByRequest=0x%p",
      this, ToChar(aEvent.mMessage),
      GetEscapedUTF8String(aEvent.mData).get(), aEvent.mData.Length(),
      aEvent.mRanges ? aEvent.mRanges->Length() : 0, mPendingEventsNeedingAck,
      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
 
   // We must be able to simulate the selection because
   // we might not receive selection updates in time
   if (!mWidgetHasComposition) {
     if (aEvent.mWidget && aEvent.mWidget->PluginHasFocus()) {
       // If focus is on plugin, we cannot get selection range
@@ -1188,56 +1186,56 @@ ContentCacheInParent::OnSelectionEvent(
      "mPendingCompositionCount=%u",
      this, ToChar(aSelectionEvent.mMessage),
      aSelectionEvent.mOffset, aSelectionEvent.mLength,
      GetBoolName(aSelectionEvent.mReversed),
      GetBoolName(aSelectionEvent.mExpandToClusterBoundary),
      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++;
 }
 
 void
 ContentCacheInParent::OnEventNeedingAckHandled(nsIWidget* aWidget,
                                                 EventMessage aMessage)
 {
   // This is called when the child process receives WidgetCompositionEvent or
   // WidgetSelectionEvent.
 
   MOZ_LOG(sContentCacheLog, LogLevel::Info,
     ("0x%p OnEventNeedingAckHandled(aWidget=0x%p, "
      "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;
     }
 
     mPendingCompositionCount--;
     // Forget composition string only when the latest composition string is
     // handled in the remote process because if there is 2 or more pending
@@ -1249,23 +1247,23 @@ ContentCacheInParent::OnEventNeedingAckH
     // Forget pending commit string length if it's handled in the remote
     // process.  Note that this doesn't care too old composition's commit
     // string because in such case, we cannot return proper information
     // to IME synchornously.
     mPendingCommitLength = 0;
   }
 
   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;
   }
   if (--mPendingEventsNeedingAck) {
     return;
   }
 
@@ -1289,68 +1287,68 @@ ContentCacheInParent::RequestIMEToCommit
   MOZ_ASSERT(!mCommitStringByRequest);
 
   // If there are 2 or more pending compositions, we already sent
   // eCompositionCommit(AsIs) to the remote process.  So, this request is
   // too late for IME.  The remote process should wait following
   // 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;
   }
 
   // If there is no pending composition, we may have already sent
   // eCompositionCommit(AsIs) event for the active composition.  If so, the
   // remote process will receive composition events which causes cleaning up
   // 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;
   }
 
   // If TabParent which has IME focus was already changed to different one, the
   // request shouldn't be sent to IME because it's too late.
   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
     // pseudo event message from the remote process.  So, we need to increment
     // mPendingEventsNeedingAck here.
     mPendingEventsNeedingAck++;
     return true;
   }
 
   RefPtr<TextComposition> composition =
     IMEStateManager::GetTextCompositionFor(aWidget);
   if (NS_WARN_IF(!composition)) {
     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;
   }
 
   mCommitStringByRequest = &aCommittedString;
 
   // Request commit or cancel composition with TextComposition because we may
   // have already requested to commit or cancel the composition or we may
   // have already received eCompositionCommit(AsIs) event.  Those status are
@@ -1371,36 +1369,36 @@ ContentCacheInParent::RequestIMEToCommit
     // TextComposition instance will synthesize commit events and wait to
     // receive delayed composition events.  When TextComposition instances both
     // in this process and the remote process will be destroyed when delayed
     // composition events received. TextComposition instance in the parent
     // process will dispatch following composition events and be destroyed
     // 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;
   }
 
   // When the composition is committed synchronously, the commit string will be
   // returned to the remote process. Then, PuppetWidget will dispatch
   // eCompositionCommit event with the returned commit string (i.e., the value
   // is aCommittedString of this method).  Finally, TextComposition instance in
   // the remote process will be destroyed by
   // 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;
 }
 
 void
 ContentCacheInParent::MaybeNotifyIME(nsIWidget* aWidget,
                                      const IMENotification& aNotification)
 {
   if (!mPendingEventsNeedingAck) {
@@ -1487,17 +1485,17 @@ ContentCacheInParent::FlushPendingNotifi
       (mPendingTextChange.HasNotification() ||
        mPendingSelectionChange.HasNotification() ||
        mPendingLayoutChange.HasNotification() ||
        mPendingCompositionUpdate.HasNotification())) {
     FlushPendingNotifications(widget);
   }
 }
 
-#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
+#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
 
 void
 ContentCacheInParent::RemoveUnnecessaryEventMessageLog()
 {
   bool foundLastCompositionStart = false;
   for (size_t i = mDispatchedEventMessages.Length(); i > 1; i--) {
     if (mDispatchedEventMessages[i - 1] != eCompositionStart) {
       continue;
@@ -1576,17 +1574,17 @@ ContentCacheInParent::AppendEventMessage
          mRequestIMEToCommitCompositionResults) {
     aLog.AppendLiteral("  ");
     aLog.Append(ToReadableText(result));
     aLog.AppendLiteral("\n");
   }
   aLog.AppendLiteral("\n");
 }
 
-#endif // #if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
+#endif // #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
 
 /*****************************************************************************
  * mozilla::ContentCache::TextRectArray
  *****************************************************************************/
 
 LayoutDeviceIntRect
 ContentCache::TextRectArray::GetRect(uint32_t aOffset) const
 {
--- a/widget/ContentCache.h
+++ b/widget/ContentCache.h
@@ -405,17 +405,17 @@ public:
                       const IMENotification& aNotification);
 
 private:
   IMENotification mPendingSelectionChange;
   IMENotification mPendingTextChange;
   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;
   // Log of RequestIMEToCommitComposition() in the last 2 compositions.
   enum class RequestIMEToCommitCompositionResult : uint8_t
   {
     eToOldCompositionReceived,
     eToCommittedCompositionReceived,
@@ -445,17 +445,17 @@ private:
       case RequestIMEToCommitCompositionResult::eHandledSynchronously:
         return "Commit reqeust is handled synchronously";
       default:
         return "Unknown reason";
     }
   }
   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;
   // mCompositionString is composition string which were sent to the remote
   // process but not yet committed in the remote process.
   nsString mCompositionString;
   // This is not nullptr only while the instance is requesting IME to
   // composition.  Then, data value of dispatched composition events should
@@ -502,25 +502,25 @@ private:
                    LayoutDeviceIntRect& aTextRect) const;
   bool GetUnionTextRects(uint32_t aOffset,
                          uint32_t aLength,
                          bool aRoundToExistingOffset,
                          LayoutDeviceIntRect& aUnionTextRect) const;
 
   void FlushPendingNotifications(nsIWidget* aWidget);
 
-#if defined(MOZ_CRASHREPORTER) && MOZ_DIAGNOSTIC_ASSERT_ENABLED
+#if MOZ_DIAGNOSTIC_ASSERT_ENABLED
   /**
    * Remove unnecessary messages from mDispatchedEventMessages and
    * mReceivedEventMessages.
    */
   void RemoveUnnecessaryEventMessageLog();
 
   /**
    * 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
 
 #endif // mozilla_ContentCache_h
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -33,20 +33,16 @@
 #include "mozilla/gfx/Logging.h"
 #include "mozilla/gfx/gfxVars.h"
 #include "MediaPrefs.h"
 #include "gfxPrefs.h"
 #include "gfxPlatform.h"
 #include "gfxConfig.h"
 #include "DriverCrashGuard.h"
 
-#if defined(MOZ_CRASHREPORTER)
-#include "nsExceptionHandler.h"
-#endif
-
 using namespace mozilla::widget;
 using namespace mozilla;
 using mozilla::MutexAutoLock;
 
 nsTArray<GfxDriverInfo>* GfxInfoBase::mDriverInfo;
 nsTArray<dom::GfxInfoFeatureStatus>* GfxInfoBase::mFeatureStatus;
 bool GfxInfoBase::mDriverInfoObserverInitialized;
 bool GfxInfoBase::mShutdownOccurred;
--- a/widget/GfxInfoX11.cpp
+++ b/widget/GfxInfoX11.cpp
@@ -6,24 +6,22 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #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 {
 
 #ifdef DEBUG
 NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
 #endif
 
@@ -171,37 +169,35 @@ GfxInfo::GetData()
             mAdapterDescription.AppendPrintf(" (exited with status %d)", WEXITSTATUS(glxtest_status));
         if (received_signal)
             mAdapterDescription.AppendPrintf(" (received signal %d)", WTERMSIG(glxtest_status));
         if (bytesread) {
             mAdapterDescription.AppendLiteral(": ");
             mAdapterDescription.Append(nsDependentCString(buf));
             mAdapterDescription.Append('\n');
         }
-#ifdef MOZ_CRASHREPORTER
+
         CrashReporter::AppendAppNotesToCrashReport(mAdapterDescription);
-#endif
         return;
     }
 
     mAdapterDescription.Append(mVendor);
     mAdapterDescription.AppendLiteral(" -- ");
     mAdapterDescription.Append(mRenderer);
 
     nsAutoCString note;
     note.AppendLiteral("OpenGL: ");
     note.Append(mAdapterDescription);
     note.AppendLiteral(" -- ");
     note.Append(mVersion);
     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);
 
     // determine driver type (vendor) and where in the version string
     // the actual driver version numbers should be expected to be found (whereToReadVersionNumbers)
     const char *whereToReadVersionNumbers = nullptr;
     const char *Mesa_in_version_string = strstr(mVersion.get(), "Mesa");
--- a/widget/android/GfxInfo.cpp
+++ b/widget/android/GfxInfo.cpp
@@ -3,27 +3,25 @@
  * 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 "GfxInfo.h"
 #include "GLContext.h"
 #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 {
 
 class GfxInfo::GLStrings
 {
   nsCString mVendor;
   nsCString mRenderer;
@@ -345,31 +343,29 @@ GfxInfo::GetIsGPU2Active(bool* aIsGPU2Ac
 {
   EnsureInitialized();
   return NS_ERROR_FAILURE;
 }
 
 void
 GfxInfo::AddCrashReportAnnotations()
 {
-#if defined(MOZ_CRASHREPORTER)
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterVendorID"),
                                      mGLStrings->Vendor());
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDeviceID"),
                                      mGLStrings->Renderer());
   CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AdapterDriverVersion"),
                                      mGLStrings->Version());
 
   /* 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;
   note.AppendPrintf("AdapterDescription: '%s'\n", mAdapterDescription.get());
 
   CrashReporter::AppendAppNotesToCrashReport(note);
-#endif
 }
 
 const nsTArray<GfxDriverInfo>&
 GfxInfo::GetGfxDriverInfo()
 {
   if (mDriverInfo->IsEmpty()) {
     APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Android,
       (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAll), GfxDriverInfo::allDevices,
--- a/widget/android/jni/Utils.cpp
+++ b/widget/android/jni/Utils.cpp
@@ -4,20 +4,17 @@
 #include <android/log.h>
 #include <pthread.h>
 
 #include "mozilla/Assertions.h"
 
 #include "GeneratedJNIWrappers.h"
 #include "AndroidBuild.h"
 #include "nsAppShell.h"
-
-#ifdef MOZ_CRASHREPORTER
 #include "nsExceptionHandler.h"
-#endif
 
 namespace mozilla {
 namespace jni {
 
 namespace detail {
 
 #define DEFINE_PRIMITIVE_TYPE_ADAPTER(NativeType, JNIType, JNIName, ABIName) \
     \
@@ -201,30 +198,28 @@ bool HandleUncaughtException(JNIEnv* aEn
 
     return true;
 }
 
 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()));
 
     auto appNotes = java::GeckoAppShell::GetAppNotes();
     if (NS_WARN_IF(aEnv->ExceptionCheck())) {
         aEnv->ExceptionDescribe();
         aEnv->ExceptionClear();
     } else if (appNotes) {
         CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("\n") +
                                                    appNotes->ToCString());
     }
-#endif // MOZ_CRASHREPORTER
 
     if (sOOMErrorClass && aEnv->IsInstanceOf(aExc, sOOMErrorClass)) {
         NS_ABORT_OOM(0); // Unknown OOM size
     }
     return result;
 }
 
 namespace {
--- a/widget/android/nsAppShell.cpp
+++ b/widget/android/nsAppShell.cpp
@@ -4,21 +4,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsAppShell.h"
 
 #include "base/basictypes.h"
 #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"
 #include "nsCacheService.h"
 #include "nsIDOMEventListener.h"
 #include "nsIDOMClientRectList.h"
 #include "nsIDOMClientRect.h"
 #include "nsIDOMWakeLockListener.h"
@@ -53,21 +55,16 @@
 #include "nsIURI.h"
 #include "IHistory.h"
 #endif
 
 #ifdef MOZ_LOGGING
 #include "mozilla/Logging.h"
 #endif
 
-#ifdef MOZ_CRASHREPORTER
-#include "nsICrashReporter.h"
-#include "nsExceptionHandler.h"
-#endif
-
 #include "AndroidAlerts.h"
 #include "AndroidUiThread.h"
 #include "ANRReporter.h"
 #include "GeckoBatteryManager.h"
 #include "GeckoNetworkManager.h"
 #include "GeckoProcessManager.h"
 #include "GeckoScreenOrientation.h"
 #include "GeckoVRManager.h"
--- a/widget/cocoa/GfxInfo.mm
+++ b/widget/cocoa/GfxInfo.mm
@@ -5,29 +5,27 @@
 
 #include <OpenGL/OpenGL.h>
 #include <OpenGL/CGLRenderers.h>
 
 #include "mozilla/ArrayUtils.h"
 
 #include "GfxInfo.h"
 #include "nsUnicharUtils.h"
+#include "nsExceptionHandler.h"
 #include "nsCocoaFeatures.h"
+#include "nsICrashReporter.h"
 #include "mozilla/Preferences.h"
 #include <algorithm>
 
 #import <Foundation/Foundation.h>
 #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;
 
 #ifdef DEBUG
 NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
 #endif
 
@@ -270,17 +268,16 @@ NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
   return NS_ERROR_FAILURE;
 }
 
 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);
@@ -296,17 +293,16 @@ GfxInfo::AddCrashReportAnnotations()
    * can go away after we store the above in the socorro db */
   nsAutoCString note;
   /* AppendPrintf only supports 32 character strings, mrghh. */
   note.AppendLiteral("AdapterVendorID: ");
   note.Append(narrowVendorID);
   note.AppendLiteral(", AdapterDeviceID: ");
   note.Append(narrowDeviceID);
   CrashReporter::AppendAppNotesToCrashReport(note);
-#endif
 }
 
 // We don't support checking driver versions on Mac.
 #define IMPLEMENT_MAC_DRIVER_BLOCKLIST(os, vendor, device, features, blockOn, ruleId) \
   APPEND_TO_DRIVER_BLOCKLIST(os, vendor, device, features, blockOn,           \
                              DRIVER_COMPARISON_IGNORED, V(0,0,0,0), ruleId, "")
 
 
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -14,16 +14,17 @@
 #include "nsCocoaWindow.h"
 
 #include "mozilla/MiscEvents.h"
 #include "mozilla/MouseEvents.h"
 #include "mozilla/TextEvents.h"
 #include "mozilla/TouchEvents.h"
 
 #include "nsArrayUtils.h"
+#include "nsExceptionHandler.h"
 #include "nsObjCExceptions.h"
 #include "nsCOMPtr.h"
 #include "nsThreadUtils.h"
 #include "nsToolkit.h"
 #include "nsCRT.h"
 
 #include "nsFontMetrics.h"
 #include "nsIRollupListener.h"
@@ -78,19 +79,16 @@
 #include "gfxPrefs.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/BorrowedContext.h"
 #include "mozilla/gfx/MacIOSurface.h"
 #ifdef ACCESSIBILITY
 #include "nsAccessibilityService.h"
 #include "mozilla/a11y/Platform.h"
 #endif
-#ifdef MOZ_CRASHREPORTER
-#include "nsExceptionHandler.h"
-#endif
 
 #include "mozilla/Preferences.h"
 
 #include <dlfcn.h>
 
 #include <ApplicationServices/ApplicationServices.h>
 
 #include "GeckoProfiler.h"
@@ -5514,41 +5512,40 @@ GetIntegerDeltaForEvent(NSEvent* aEvent)
   NSWindow *viewWindow = [self window];
   if (viewWindow && [viewWindow isKeyWindow]) {
     [viewWindow orderWindow:NSWindowAbove relativeTo:0];
   }
 
 #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
     }
   }
 #endif // #if !defined(RELEASE_OR_BETA) || defined(DEBUG)
 
   nsAutoRetainCocoaObject kungFuDeathGrip(self);
   if (mGeckoChild) {
--- a/widget/nsBaseAppShell.cpp
+++ b/widget/nsBaseAppShell.cpp
@@ -1,19 +1,17 @@
 /* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
 /* 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 "base/message_loop.h"
 
 #include "nsBaseAppShell.h"
-#if defined(MOZ_CRASHREPORTER)
 #include "nsExceptionHandler.h"
-#endif
 #include "nsThreadUtils.h"
 #include "nsIObserverService.h"
 #include "nsServiceManagerUtils.h"
 #include "mozilla/Services.h"
 #include "nsXULAppAPI.h"
 
 // When processing the next thread event, the appshell may process native
 // events (if not in performance mode), which can result in suppressing the
@@ -315,28 +313,24 @@ nsBaseAppShell::DispatchDummyEvent(nsITh
 
   return NS_SUCCEEDED(aTarget->Dispatch(mDummyEvent, NS_DISPATCH_NORMAL));
 }
 
 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
 NS_IMETHODIMP
 nsBaseAppShell::AfterProcessNextEvent(nsIThreadInternal *thr,
                                       bool eventWasProcessed)
 {
   return NS_OK;
--- a/widget/windows/GfxInfo.cpp
+++ b/widget/windows/GfxInfo.cpp
@@ -13,25 +13,23 @@
 #include "GfxInfoWebGL.h"
 #include "nsUnicharUtils.h"
 #include "prenv.h"
 #include "prprf.h"
 #include "GfxDriverInfo.h"
 #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;
 using namespace mozilla::widget;
 
 #ifdef DEBUG
 NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
 #endif
@@ -849,37 +847,34 @@ NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
   // This is never the case, as the active GPU ends up being
   // the first one.  It should probably be removed.
   *aIsGPU2Active = false;
   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 */
 static void
 CheckForCiscoVPN() {
   LONG result;
   HKEY key;
   /* This will give false positives, but hopefully no false negatives */
   result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Cisco Systems\\VPN Client", 0, KEY_QUERY_VALUE, &key);
   if (result == ERROR_SUCCESS) {
     RegCloseKey(key);
     CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("Cisco VPN\n"));
   }
 }
-#endif
 
 void
 GfxInfo::AddCrashReportAnnotations()
 {
-#if defined(MOZ_CRASHREPORTER)
   CheckForCiscoVPN();
 
   if (mHasDriverVersionMismatch) {
     CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("DriverVersionMismatch\n"));
   }
 
   nsString deviceID, vendorID, driverVersion, subsysID;
   nsCString narrowDeviceID, narrowVendorID, narrowDriverVersion, narrowSubsysID;
@@ -949,18 +944,16 @@ GfxInfo::AddCrashReportAnnotations()
     note.AppendLiteral(", AdapterDeviceID2: ");
     note.Append(narrowDeviceID2);
     note.AppendLiteral(", AdapterSubsysID2: ");
     note.Append(narrowSubsysID2);
     note.AppendLiteral(", AdapterDriverVersion2: ");
     note.Append(NS_LossyConvertUTF16toASCII(adapterDriverVersionString2));
   }
   CrashReporter::AppendAppNotesToCrashReport(note);
-
-#endif
 }
 
 static OperatingSystem
 WindowsVersionToOperatingSystem(int32_t aWindowsVersion)
 {
   switch(aWindowsVersion) {
     case kWindows7:
       return OperatingSystem::Windows7;
--- a/widget/windows/KeyboardLayout.cpp
+++ b/widget/windows/KeyboardLayout.cpp
@@ -7,19 +7,17 @@
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/MouseEvents.h"
 #include "mozilla/MiscEvents.h"
 #include "mozilla/TextEvents.h"
 
 #include "nsAlgorithm.h"
-#ifdef MOZ_CRASHREPORTER
 #include "nsExceptionHandler.h"
-#endif
 #include "nsGkAtoms.h"
 #include "nsIIdleServiceInternal.h"
 #include "nsIWindowsRegKey.h"
 #include "nsMemory.h"
 #include "nsPrintfCString.h"
 #include "nsQuickSort.h"
 #include "nsServiceManagerUtils.h"
 #include "nsToolkit.h"
@@ -2691,18 +2689,16 @@ NativeKey::NeedsToHandleWithoutFollowing
     return false;
   }
 
   // Even if the key is a printable key, it might cause non-printable character
   // input with modifier key(s).
   return mIsPrintableKey;
 }
 
-#ifdef MOZ_CRASHREPORTER
-
 static nsCString
 GetResultOfInSendMessageEx()
 {
   DWORD ret = ::InSendMessageEx(nullptr);
   if (!ret) {
     return NS_LITERAL_CSTRING("ISMEX_NOSEND");
   }
   nsAutoCString result;
@@ -2725,18 +2721,16 @@ GetResultOfInSendMessageEx()
     if (!result.IsEmpty()) {
       result += " | ";
     }
     result += "ISMEX_SEND";
   }
   return result;
 }
 
-#endif // #ifdef MOZ_CRASHREPORTER
-
 bool
 NativeKey::MayBeSameCharMessage(const MSG& aCharMsg1,
                                 const MSG& aCharMsg2) const
 {
   // NOTE: Although, we don't know when this case occurs, the scan code value
   //       in lParam may be changed from 0 to something.  The changed value
   //       is different from the scan code of handling keydown message.
   static const LPARAM kScanCodeMask = 0x00FF0000;
@@ -2970,17 +2964,16 @@ NativeKey::GetFollowingCharMessage(MSG& 
       }
       MOZ_LOG(sNativeKeyLogger, LogLevel::Error,
         ("%p   NativeKey::GetFollowingCharMessage(), FAILED, lost target "
          "message to remove, nextKeyMsg=%s",
          this, ToString(nextKeyMsg).get()));
     }
 
     if (doCrash) {
-#ifdef MOZ_CRASHREPORTER
       nsPrintfCString info("\nPeekMessage() failed to remove char message! "
                            "\nActive keyboard layout=0x%08X (%s), "
                            "\nHandling message: %s, InSendMessageEx()=%s, "
                            "\nFound message: %s, "
                            "\nWM_NULL has been removed: %d, "
                            "\nNext key message in all windows: %s, "
                            "time=%d, ",
                            KeyboardLayout::GetActiveLayout(),
@@ -2996,17 +2989,17 @@ NativeKey::GetFollowingCharMessage(MSG& 
                                 PM_NOREMOVE | PM_NOYIELD)) {
         nsPrintfCString info("\nNext message in all windows: %s, time=%d",
                              ToString(nextMsg).get(), nextMsg.time);
         CrashReporter::AppendAppNotesToCrashReport(info);
       } else {
         CrashReporter::AppendAppNotesToCrashReport(
           NS_LITERAL_CSTRING("\nThere is no message in any window"));
       }
-#endif // #ifdef MOZ_CRASHREPORTER
+
       MOZ_CRASH("We lost the following char message");
     }
 
     // We're still not sure why ::PeekMessage() may return WM_NULL even with
     // its first message and its last message are same message.  However,
     // at developing Metrofox, we met this case even with usual keyboard
     // layouts.  So, it might be possible in desktop application or it really
     // occurs with some odd keyboard layouts which perhaps hook API.
@@ -3115,17 +3108,16 @@ NativeKey::GetFollowingCharMessage(MSG& 
     //       in lParam may be changed from 0 to something.  The changed value
     //       is different from the scan code of handling keydown message.
     MOZ_LOG(sNativeKeyLogger, LogLevel::Error,
       ("%p   NativeKey::GetFollowingCharMessage(), FAILED, removed message "
        "is really different from what we have already found, removedMsg=%s, "
        "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, "
                          "\nFound message: %s, "
                          "\nRemoved message: %s, ",
                          KeyboardLayout::GetActiveLayout(),
                          KeyboardLayout::GetActiveLayoutName().get(),
                          ToString(mMsg).get(),
@@ -3153,35 +3145,33 @@ NativeKey::GetFollowingCharMessage(MSG& 
                               PM_NOREMOVE | PM_NOYIELD)) {
       nsPrintfCString info("\nNext key message in all windows: %s.",
                            ToString(nextKeyMsgInAllWindows).get());
       CrashReporter::AppendAppNotesToCrashReport(info);
     } else {
       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"
                        "Found message: %s, removed a lot of WM_NULL",
                        KeyboardLayout::GetActiveLayout(),
                        KeyboardLayout::GetActiveLayoutName().get(),
                        ToString(mMsg).get(),
                        GetResultOfInSendMessageEx().get(),
                        ToString(kFoundCharMsg).get());
   CrashReporter::AppendAppNotesToCrashReport(info);
-#endif // #ifdef MOZ_CRASHREPORTER
   MOZ_CRASH("We lost the following char message");
   return false;
 }
 
 bool
 NativeKey::MaybeDispatchPluginEventsForRemovedCharMessages() const
 {
   MOZ_ASSERT(IsKeyDownMessage());
--- a/widget/windows/moz.build
+++ b/widget/windows/moz.build
@@ -37,16 +37,17 @@ UNIFIED_SOURCES += [
     'CompositorWidgetParent.cpp',
     'GfxInfo.cpp',
     'IEnumFE.cpp',
     'IMMHandler.cpp',
     'InkCollector.cpp',
     'InProcessWinCompositorWidget.cpp',
     'JumpListItem.cpp',
     'KeyboardLayout.cpp',
+    'LSPAnnotator.cpp',
     'nsAppShell.cpp',
     'nsClipboard.cpp',
     'nsColorPicker.cpp',
     'nsDataObj.cpp',
     'nsDataObjCollection.cpp',
     'nsDragService.cpp',
     'nsIdleServiceWin.cpp',
     'nsImageClipboard.cpp',
@@ -82,21 +83,16 @@ SOURCES += [
     'nsBidiKeyboard.cpp',
     'nsFilePicker.cpp',
     'nsWidgetFactory.cpp',
     'WinCompositorWidget.cpp',
     'WindowsUIUtils.cpp',
     'WinMouseScrollHandler.cpp',
 ]
 
-if CONFIG['MOZ_CRASHREPORTER']:
-    UNIFIED_SOURCES += [
-        'LSPAnnotator.cpp',
-    ]
-
 if CONFIG['NS_PRINTING']:
     UNIFIED_SOURCES += [
         'nsDeviceContextSpecWin.cpp',
         'nsPrintDialogUtil.cpp',
         'nsPrintDialogWin.cpp',
         'nsPrintOptionsWin.cpp',
         'nsPrintSettingsWin.cpp',
     ]
--- a/widget/windows/nsAppShell.cpp
+++ b/widget/windows/nsAppShell.cpp
@@ -159,19 +159,17 @@ nsAppShell::~nsAppShell()
     // the UI thread.
     SendMessage(mEventWnd, WM_CLOSE, 0, 0);
   }
 }
 
 nsresult
 nsAppShell::Init()
 {
-#ifdef MOZ_CRASHREPORTER
   LSPAnnotate();
-#endif
 
   mLastNativeEventScheduled = TimeStamp::NowLoRes();
 
   mozilla::ipc::windows::InitUIThread();
 
   sTaskbarButtonCreatedMsg = ::RegisterWindowMessageW(kTaskbarButtonEventId);
   NS_ASSERTION(sTaskbarButtonCreatedMsg, "Could not register taskbar button creation message");