Backed out changeset cc4c72425f0e, bug 620974 - Add memory mapping info to Windows minidumps. r=timeless,bsmedberg, a=bsmedberg
authorTed Mielczarek <ted.mielczarek@gmail.com>
Tue, 11 Jan 2011 10:28:55 -0500
changeset 60512 f725e0b7787b167aa428be98cabc8e4c9b465e3f
parent 60511 5aebaa05234c714af26c4b282ca057094d6bde8c
child 60513 f932163ae6a07439ad8f0b2f3574222d67dbea75
push id18030
push usertmielczarek@mozilla.com
push dateFri, 14 Jan 2011 15:39:54 +0000
treeherdermozilla-central@bd51bbe88214 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstimeless, bsmedberg, bsmedberg
bugs620974
milestone2.0b10pre
backs outcc4c72425f0ec9112a0d2df7196b9ba5c3e72c3d
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
Backed out changeset cc4c72425f0e, bug 620974 - Add memory mapping info to Windows minidumps. r=timeless,bsmedberg, a=bsmedberg Didn't fix the actual bug, new patch being landed.
toolkit/crashreporter/nsExceptionHandler.cpp
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -204,20 +204,16 @@ static const char kAvailableVirtualMemor
 static const int kAvailableVirtualMemoryParameterLen =
   sizeof(kAvailableVirtualMemoryParameter)-1;
 
 // this holds additional data sent via the API
 static AnnotationTable* crashReporterAPIData_Hash;
 static nsCString* crashReporterAPIData = nsnull;
 static nsCString* notesField = nsnull;
 
-#if defined(XP_WIN)
-static HMODULE dbghelp = NULL;
-#endif
-
 #if defined(MOZ_IPC)
 // OOP crash reporting
 static CrashGenerationServer* crashServer; // chrome process has this
 
 #  if defined(XP_WIN) || defined(XP_MACOSX)
 // If crash reporting is disabled, we hand out this "null" pipe to the
 // child process and don't attempt to connect to a parent server.
 static const char kNullNotifyPipe[] = "-";
@@ -716,50 +712,28 @@ nsresult SetExceptionHandler(nsILocalFil
                                     pref_cpu_types,
                                     &attr_ocount) != 0 ||
       attr_ocount != attr_count) {
     posix_spawnattr_destroy(&spawnattr);
     return NS_ERROR_FAILURE;
   }
 #endif
 
-#ifdef XP_WIN
-  // Try to determine what version of dbghelp.dll we're using.
-  // MinidumpWithFullMemoryInfo is only available in 6.2 or newer.
-  dbghelp = LoadLibraryW(L"dbghelp.dll");
-  MINIDUMP_TYPE minidump_type = MiniDumpNormal;
-  if (dbghelp) {
-    typedef LPAPI_VERSION (WINAPI *ImagehlpApiVersionPtr)(void);
-    ImagehlpApiVersionPtr imagehlp_api_version =
-      (ImagehlpApiVersionPtr)GetProcAddress(dbghelp, "ImagehlpApiVersion");
-    if (imagehlp_api_version) {
-      LPAPI_VERSION api_version = imagehlp_api_version();
-      if (api_version->MajorVersion > 6 ||
-          (api_version->MajorVersion == 6 && api_version->MinorVersion > 1)) {
-        minidump_type = MiniDumpWithFullMemoryInfo;
-      }
-    }
-  }
-#endif
-
   // now set the exception handler
   gExceptionHandler = new google_breakpad::
     ExceptionHandler(tempPath.get(),
 #ifdef XP_WIN
                      FPEFilter,
 #else
                      nsnull,
 #endif
                      MinidumpCallback,
                      nsnull,
 #if defined(XP_WIN32)
-                     google_breakpad::ExceptionHandler::HANDLER_ALL,
-                     minidump_type,
-                     NULL,
-                     NULL);
+                     google_breakpad::ExceptionHandler::HANDLER_ALL);
 #else
                      true
 #if defined(XP_MACOSX)
                        , NULL
 #endif
                       );
 #endif // XP_WIN32
 
@@ -1023,22 +997,16 @@ nsresult SetupExtraData(nsILocalFile* aA
 }
 
 static void OOPDeinit();
 
 nsresult UnsetExceptionHandler()
 {
   delete gExceptionHandler;
 
-#if defined(XP_WIN)
-  if (dbghelp) {
-    FreeLibrary(dbghelp);
-  }
-#endif
-
   // do this here in the unlikely case that we succeeded in allocating
   // our strings but failed to allocate gExceptionHandler.
   if (crashReporterAPIData_Hash) {
     delete crashReporterAPIData_Hash;
     crashReporterAPIData_Hash = nsnull;
   }
 
   if (crashReporterAPIData) {