Bug 769048 part C - Build an injector DLL which can watch for crashes in Flash player processes. This involves building two copies of breakpad: one to live inside of libxul which uses mozalloc and the dynamic CRT, another to link into the injector which links the CRT statically and doesn't use mozalloc. Introduce a new define/makefile variable MOZ_CRASHREPORTER_INJECTOR rather than repeating "#if defined(XP_WIN) && !defined(HAVE_64BIT_OS) in many places. r=ehsan/khuey
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 02 Jul 2012 14:55:12 -0400
changeset 98164 141f0a09f4b60253b60bf7ecfbbea54d6a2ac2d2
parent 98163 c154cee1928a754e1aded5f4fee16e9c282620ca
child 98165 6990667ebd08aa06536c93ed7b0a4e42c187fab1
push id23030
push userbsmedberg@mozilla.com
push dateTue, 03 Jul 2012 11:52:59 +0000
treeherdermozilla-central@1d370ca5bb8d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, khuey
bugs769048
milestone16.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 769048 part C - Build an injector DLL which can watch for crashes in Flash player processes. This involves building two copies of breakpad: one to live inside of libxul which uses mozalloc and the dynamic CRT, another to link into the injector which links the CRT statically and doesn't use mozalloc. Introduce a new define/makefile variable MOZ_CRASHREPORTER_INJECTOR rather than repeating "#if defined(XP_WIN) && !defined(HAVE_64BIT_OS) in many places. r=ehsan/khuey
browser/installer/package-manifest.in
config/autoconf.mk.in
configure.in
toolkit/crashreporter/Makefile.in
toolkit/crashreporter/breakpad-windows-libxul/Makefile.in
toolkit/crashreporter/breakpad-windows-standalone/Makefile.in
toolkit/crashreporter/client/Makefile.in
toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/Makefile.in
toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/objs.mk
toolkit/crashreporter/google-breakpad/src/client/windows/handler/Makefile.in
toolkit/crashreporter/google-breakpad/src/client/windows/handler/objs.mk
toolkit/crashreporter/google-breakpad/src/client/windows/sender/Makefile.in
toolkit/crashreporter/google-breakpad/src/client/windows/sender/objs.mk
toolkit/crashreporter/google-breakpad/src/common/windows/Makefile.in
toolkit/crashreporter/google-breakpad/src/common/windows/objs.mk
toolkit/crashreporter/injector/Makefile.in
toolkit/crashreporter/injector/injector.cpp
toolkit/toolkit-makefiles.sh
toolkit/xre/Makefile.in
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -656,16 +656,19 @@ bin/libfreebl_32int64_3.so
 #else
 @BINPATH@/crashreporter@BIN_SUFFIX@
 @BINPATH@/crashreporter.ini
 #ifdef XP_UNIX
 @BINPATH@/Throbber-small.gif
 #endif
 #endif
 @BINPATH@/crashreporter-override.ini
+#ifdef MOZ_CRASHREPORTER_INJECTOR
+@BINPATH@/breakpadinjector.dll
+#endif
 #endif
 
 ; [Extensions]
 ;
 #ifdef MOZ_ENABLE_GNOMEVFS
 bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
 #endif
 
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -151,16 +151,17 @@ VPX_NEED_OBJ_INT_EXTRACT = @VPX_NEED_OBJ
 LIBJPEG_TURBO_AS = @LIBJPEG_TURBO_AS@
 LIBJPEG_TURBO_ASFLAGS = @LIBJPEG_TURBO_ASFLAGS@
 LIBJPEG_TURBO_X86_ASM = @LIBJPEG_TURBO_X86_ASM@
 LIBJPEG_TURBO_X64_ASM = @LIBJPEG_TURBO_X64_ASM@
 LIBJPEG_TURBO_ARM_ASM = @LIBJPEG_TURBO_ARM_ASM@
 NS_PRINTING = @NS_PRINTING@
 MOZ_PDF_PRINTING = @MOZ_PDF_PRINTING@
 MOZ_CRASHREPORTER = @MOZ_CRASHREPORTER@
+MOZ_CRASHREPORTER_INJECTOR = @MOZ_CRASHREPORTER_INJECTOR@
 MOZ_HELP_VIEWER = @MOZ_HELP_VIEWER@
 MOC = @MOC@
 RCC = @RCC@
 MOZ_NSS_PATCH = @MOZ_NSS_PATCH@
 MOZ_WEBGL = @MOZ_WEBGL@
 MOZ_ANGLE = @MOZ_ANGLE@
 MOZ_DIRECTX_SDK_PATH = @MOZ_DIRECTX_SDK_PATH@
 MOZ_DIRECTX_SDK_CPU_SUFFIX = @MOZ_DIRECTX_SDK_CPU_SUFFIX@
--- a/configure.in
+++ b/configure.in
@@ -5885,16 +5885,21 @@ if test -n "$MOZ_CRASHREPORTER"; then
     AC_SUBST(MOZ_GTHREAD_LIBS)
 
     MOZ_CHECK_HEADERS([curl/curl.h], [], [AC_MSG_ERROR([Couldn't find curl/curl.h which is required for the crash reporter.  Use --disable-crashreporter to disable the crash reporter.])])
   fi
 
   if (test "$OS_ARCH" != "$HOST_OS_ARCH"); then
     AC_MSG_ERROR([Breakpad tools do not support compiling on $HOST_OS_ARCH while targeting $OS_ARCH.  Use --disable-crashreporter.])
   fi
+
+  if test "$OS_ARCH" == "WINNT" -a -z "$HAVE_64BIT_OS"; then
+    MOZ_CRASHREPORTER_INJECTOR=1
+    AC_DEFINE(MOZ_CRASHREPORTER_INJECTOR)
+  fi
 fi
 
 MOZ_ARG_WITH_STRING(crashreporter-enable-percent,
 [  --with-crashreporter-enable-percent=NN
                           Enable sending crash reports by default on NN% of users. (default=100)],
 [ val=`echo $withval | sed 's/[^0-9]//g'`
     MOZ_CRASHREPORTER_ENABLE_PERCENT="$val"])
 
@@ -8354,16 +8359,17 @@ AC_SUBST(ENABLE_TESTS)
 AC_SUBST(ENABLE_MARIONETTE)
 AC_SUBST(IBMBIDI)
 AC_SUBST(MOZ_UNIVERSALCHARDET)
 AC_SUBST(ACCESSIBILITY)
 AC_SUBST(MOZ_SPELLCHECK)
 AC_SUBST(MOZ_JAVA_COMPOSITOR)
 AC_SUBST(MOZ_ONLY_TOUCH_EVENTS)
 AC_SUBST(MOZ_CRASHREPORTER)
+AC_SUBST(MOZ_CRASHREPORTER_INJECTOR)
 AC_SUBST(MOZ_MAINTENANCE_SERVICE)
 AC_SUBST(MOZ_VERIFY_MAR_SIGNATURE)
 AC_SUBST(MOZ_ENABLE_SIGNMAR)
 AC_SUBST(MOZ_UPDATER)
 AC_SUBST(MOZ_ANGLE)
 AC_SUBST(MOZ_DIRECTX_SDK_PATH)
 AC_SUBST(MOZ_DIRECTX_SDK_CPU_SUFFIX)
 AC_SUBST(MOZ_D3DX9_VERSION)
--- a/toolkit/crashreporter/Makefile.in
+++ b/toolkit/crashreporter/Makefile.in
@@ -9,22 +9,20 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = crashreporter
 LIBXUL_LIBRARY = 1
 LIBRARY_NAME = exception_handler_s
 
 ifeq  ($(OS_ARCH),WINNT)
-DIRS += \
-  google-breakpad/src/common/windows \
-  google-breakpad/src/client/windows/handler \
-  google-breakpad/src/client/windows/sender \
-  google-breakpad/src/client/windows/crash_generation \
-  $(NULL)
+DIRS += breakpad-windows-libxul
+ifdef MOZ_CRASHREPORTER_INJECTOR
+DIRS += breakpad-windows-standalone
+endif
 endif
 
 ifeq ($(OS_ARCH),Darwin)
 CMMSRCS = mac_utils.mm
 
 DIRS += \
   google-breakpad/src/common \
   google-breakpad/src/common/mac \
@@ -69,16 +67,20 @@ endif
 ifeq ($(OS_TARGET),Android)
 DIRS += fileid
 # NDK5 workarounds
 DEFINES += -D_STLP_CONST_CONSTRUCTOR_BUG -D_STLP_NO_MEMBER_TEMPLATES
 endif
 
 DIRS += client
 
+ifdef MOZ_CRASHREPORTER_INJECTOR
+DIRS += injector
+endif
+
 LOCAL_INCLUDES = -I$(srcdir)/google-breakpad/src
 DEFINES += -DUNICODE -D_UNICODE
 
 EXPORTS = \
 	nsExceptionHandler.h \
 	$(NULL)
 
 CPPSRCS = \
new file mode 100644
--- /dev/null
+++ b/toolkit/crashreporter/breakpad-windows-libxul/Makefile.in
@@ -0,0 +1,41 @@
+# 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/.
+
+DEPTH = ../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+LIBRARY_NAME = google_breakpad_libxul_s
+FORCE_STATIC_LIB = 1
+
+STL_FLAGS =
+
+LOCAL_INCLUDES = -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src
+
+include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/windows/objs.mk
+include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/handler/objs.mk
+include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/sender/objs.mk
+include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/objs.mk
+
+VPATH += \
+  $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/windows \
+  $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/handler \
+  $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/sender \
+  $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation \
+  $(NULL)
+
+CPPSRCS = \
+  $(objs_common) \
+  $(objs_handler) \
+  $(objs_sender) \
+  $(objs_crash_generation) \
+  http_upload.cc \ # required for the libxul version but not standalone
+  $(NULL)
+
+DEFINES += -DUNICODE -DUNICODE_ -DBREAKPAD_NO_TERMINATE_THREAD -DNOMINMAX
+
+include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/toolkit/crashreporter/breakpad-windows-standalone/Makefile.in
@@ -0,0 +1,39 @@
+# 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/.
+
+DEPTH = ../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+LIBRARY_NAME = google_breakpad_standalone_s
+FORCE_STATIC_LIB = 1
+USE_STATIC_LIBS = 1
+MOZ_GLUE_LDFLAGS =
+
+STL_FLAGS =
+
+LOCAL_INCLUDES = -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src
+
+include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/windows/objs.mk
+include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/handler/objs.mk
+include $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/objs.mk
+
+VPATH += \
+  $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/windows \
+  $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/handler \
+  $(topsrcdir)/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation \
+  $(NULL)
+
+CPPSRCS = \
+  $(objs_common) \
+  $(objs_handler) \
+  $(objs_crash_generation) \
+  $(NULL)
+
+DEFINES += -DUNICODE -DUNICODE_ -DBREAKPAD_NO_TERMINATE_THREAD -DNOMINMAX
+
+include $(topsrcdir)/config/rules.mk
--- a/toolkit/crashreporter/client/Makefile.in
+++ b/toolkit/crashreporter/client/Makefile.in
@@ -32,18 +32,17 @@ VPATH += $(topsrcdir)/build/
 
 CPPSRCS = \
   crashreporter.cpp \
   $(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
 CPPSRCS += crashreporter_win.cpp
 LIBS += \
-  $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/windows/sender/$(LIB_PREFIX)crash_report_sender_s.$(LIB_SUFFIX) \
-  $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/windows/$(LIB_PREFIX)breakpad_windows_common_s.$(LIB_SUFFIX) \
+  $(DEPTH)/toolkit/crashreporter/breakpad-windows-libxul/$(LIB_PREFIX)google_breakpad_libxul_s.$(LIB_SUFFIX)
   $(NULL)
 LOCAL_INCLUDES += -I$(srcdir)
 RCINCLUDE = crashreporter.rc
 DEFINES += -DUNICODE -D_UNICODE
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 shell32 wininet shlwapi)
 MOZ_WINCONSOLE = 0
 endif
 
deleted file mode 100644
--- a/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/Makefile.in
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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/.
-
-DEPTH		= ../../../../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= crash_generation
-LIBRARY_NAME	= crash_generation_s
-
-LOCAL_INCLUDES 	= -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src
-DEFINES += -DUNICODE -D_UNICODE
-
-CPPSRCS		= \
-		client_info.cc \
-		crash_generation_client.cc \
-		crash_generation_server.cc \
-		minidump_generator.cc \
-		$(NULL)
-
-# need static lib
-FORCE_STATIC_LIB = 1
-
-include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/objs.mk
@@ -0,0 +1,6 @@
+objs_crash_generation = \
+  client_info.cc \
+  crash_generation_client.cc \
+  crash_generation_server.cc \
+  minidump_generator.cc \
+  $(NULL)
deleted file mode 100644
--- a/toolkit/crashreporter/google-breakpad/src/client/windows/handler/Makefile.in
+++ /dev/null
@@ -1,26 +0,0 @@
-# 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/.
-
-DEPTH		= ../../../../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= handler
-LIBRARY_NAME	= exception_handler_s
-XPI_NAME 	= crashreporter
-
-LOCAL_INCLUDES 	= -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src
-DEFINES += -DUNICODE -D_UNICODE -DBREAKPAD_NO_TERMINATE_THREAD -DNOMINMAX
-
-CPPSRCS		= \
-		exception_handler.cc \
-		$(NULL)
-
-# need static lib
-FORCE_STATIC_LIB = 1
-
-include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/toolkit/crashreporter/google-breakpad/src/client/windows/handler/objs.mk
@@ -0,0 +1,1 @@
+objs_handler = exception_handler.cc
deleted file mode 100644
--- a/toolkit/crashreporter/google-breakpad/src/client/windows/sender/Makefile.in
+++ /dev/null
@@ -1,26 +0,0 @@
-# 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/.
-
-DEPTH		= ../../../../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= sender
-LIBRARY_NAME	= crash_report_sender_s
-
-LOCAL_INCLUDES 	= -I$(srcdir)/../../..
-DEFINES += -DUNICODE -D_UNICODE
-STL_FLAGS 	=
-
-CPPSRCS		= \
-		crash_report_sender.cc \
-		$(NULL)
-
-# need static lib
-FORCE_STATIC_LIB = 1
-
-include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/toolkit/crashreporter/google-breakpad/src/client/windows/sender/objs.mk
@@ -0,0 +1,1 @@
+objs_sender = crash_report_sender.cc
deleted file mode 100644
--- a/toolkit/crashreporter/google-breakpad/src/common/windows/Makefile.in
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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/.
-
-DEPTH		= ../../../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= breakpad_windows_common
-LIBRARY_NAME	= breakpad_windows_common_s
-
-LOCAL_INCLUDES 	= -I$(srcdir)/../..
-DEFINES += -DUNICODE -D_UNICODE
-STL_FLAGS 	=
-
-CPPSRCS		= \
-		guid_string.cc \
-		http_upload.cc \
-		string_utils.cc \
-		$(NULL)
-
-# need static lib
-FORCE_STATIC_LIB = 1
-
-include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/toolkit/crashreporter/google-breakpad/src/common/windows/objs.mk
@@ -0,0 +1,4 @@
+objs_common = \
+  guid_string.cc \
+  string_utils.cc \
+  $(NULL)
new file mode 100644
--- /dev/null
+++ b/toolkit/crashreporter/injector/Makefile.in
@@ -0,0 +1,27 @@
+# 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/.
+
+DEPTH		= ../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+LIBRARY_NAME = breakpadinjector
+FORCE_SHARED_LIB = 1
+USE_STATIC_LIBS = 1
+STL_FLAGS =
+MOZ_GLUE_LDFLAGS =
+
+CPPSRCS = injector.cpp
+
+SHARED_LIBRARY_LIBS += ../breakpad-windows-standalone/$(LIB_PREFIX)google_breakpad_standalone_s.$(LIB_SUFFIX)
+
+include $(topsrcdir)/config/config.mk
+include $(topsrcdir)/ipc/chromium/chromium-config.mk
+include $(topsrcdir)/config/rules.mk
+
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src
+LDFLAGS += -ENTRY:DummyEntryPoint
new file mode 100644
--- /dev/null
+++ b/toolkit/crashreporter/injector/injector.cpp
@@ -0,0 +1,40 @@
+/* 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 <windows.h>
+
+#include "client/windows/handler/exception_handler.h"
+
+using google_breakpad::ExceptionHandler;
+using std::wstring;
+
+BOOL WINAPI DummyEntryPoint(HINSTANCE instance,
+                            DWORD reason,
+                            void* reserved)
+{
+  __debugbreak();
+
+  return FALSE; // We're being loaded remotely, this shouldn't happen!
+}
+
+// support.microsoft.com/kb/94248
+extern "C" BOOL WINAPI _CRT_INIT(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved); 
+
+extern "C"
+__declspec(dllexport) DWORD Start(void* context)
+{
+  // Because the remote DLL injector does not call DllMain, we have to
+  // initialize the CRT manually
+  _CRT_INIT(NULL, DLL_PROCESS_ATTACH, NULL);
+
+  HANDLE hCrashPipe = reinterpret_cast<HANDLE>(context);
+
+  ExceptionHandler* e = new (std::nothrow)
+    ExceptionHandler(wstring(), NULL, NULL, NULL,
+                     ExceptionHandler::HANDLER_ALL,
+                     MiniDumpNormal, hCrashPipe, NULL);
+  if (e)
+    e->set_handle_debug_exceptions(true);
+  return 1;
+}
--- a/toolkit/toolkit-makefiles.sh
+++ b/toolkit/toolkit-makefiles.sh
@@ -1143,20 +1143,19 @@ if [ "$MOZ_CRASHREPORTER" ]; then
   "
   MAKEFILES_crashreporter_shared="
     toolkit/crashreporter/google-breakpad/src/client/Makefile
     toolkit/crashreporter/google-breakpad/src/common/Makefile
     toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile
   "
   if [ "$OS_ARCH" = "WINNT" ]; then
     add_makefiles "
-      toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/Makefile
-      toolkit/crashreporter/google-breakpad/src/client/windows/handler/Makefile
-      toolkit/crashreporter/google-breakpad/src/client/windows/sender/Makefile
-      toolkit/crashreporter/google-breakpad/src/common/windows/Makefile
+      toolkit/crashreporter/breakpad-windows-libxul/Makefile
+      toolkit/crashreporter/breakpad-windows-standalone/Makefile
+      toolkit/crashreporter/injector/Makefile
     "
   elif [ "$OS_ARCH" = "Darwin" ]; then
     add_makefiles "
       $MAKEFILES_crashreporter_shared
       toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/Makefile
       toolkit/crashreporter/google-breakpad/src/client/mac/handler/Makefile
       toolkit/crashreporter/google-breakpad/src/common/mac/Makefile
       toolkit/crashreporter/google-breakpad/src/tools/mac/dump_syms/Makefile
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
@@ -123,19 +123,17 @@ ifdef MOZ_ENABLE_XREMOTE
 SHARED_LIBRARY_LIBS += $(DEPTH)/widget/xremoteclient/$(LIB_PREFIX)xremote_client_s.$(LIB_SUFFIX)
 LOCAL_INCLUDES += -I$(topsrcdir)/widget/xremoteclient
 endif
 
 ifdef MOZ_CRASHREPORTER
 SHARED_LIBRARY_LIBS += $(DEPTH)/toolkit/crashreporter/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX)
 ifeq ($(OS_ARCH),WINNT)
 SHARED_LIBRARY_LIBS += \
-  $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/windows/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \
-  $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/windows/crash_generation/$(LIB_PREFIX)crash_generation_s.$(LIB_SUFFIX) \
-  $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/windows/$(LIB_PREFIX)breakpad_windows_common_s.$(LIB_SUFFIX)
+  $(DEPTH)/toolkit/crashreporter/breakpad-windows-libxul/$(LIB_PREFIX)google_breakpad_libxul_s.$(LIB_SUFFIX)
 endif
 
 ifeq ($(OS_ARCH),Darwin)
 SHARED_LIBRARY_LIBS += \
   $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/$(LIB_PREFIX)minidump_file_writer_s.$(LIB_SUFFIX) \
   $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/$(LIB_PREFIX)crash_generation_s.$(LIB_SUFFIX) \
   $(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/mac/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \
   $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \