Backed out changeset e5a4787cccce (bug 1237463) for being the apparent cause of frequent Windows 8 debug Cpp failures ending in return code 2147483651 a=backout
authorWes Kocher <wkocher@mozilla.com>
Fri, 08 Jan 2016 14:42:37 -0800
changeset 320203 0f363ae95dc90d593394ef464aa500804c824962
parent 320094 3f780f4b14acab29b16bc4141a44180a8af9dd08
child 320204 2814f8b155fbb4709e8ca94f310b5cee73b3a8e3
child 320206 ff7d5ace8b8628af4b9fdbc4b1ca872f0324ef12
child 320258 bbbed2d8a80e2465654dad432c595a87dd7a3126
child 320278 b9e32dd2f14a6aab5c92ee81019fa7d295a31e21
child 320306 7588d04ea82a62ce980729c063cb816221d15a0e
child 320549 d34aca4fb1503fd39618da763c72770cd57e8992
child 321533 7a8dcf3a98e5976780eb575d8242a7b1ef0fe151
push id9157
push userme@alex-johnson.net
push dateSat, 09 Jan 2016 07:45:41 +0000
reviewersbackout
bugs1237463
milestone46.0a1
backs oute5a4787cccce8b3974134828ab8ddad62936ba57
Backed out changeset e5a4787cccce (bug 1237463) for being the apparent cause of frequent Windows 8 debug Cpp failures ending in return code 2147483651 a=backout
widget/windows/LSPAnnotator.cpp
widget/windows/moz.build
--- a/widget/windows/LSPAnnotator.cpp
+++ b/widget/windows/LSPAnnotator.cpp
@@ -6,29 +6,22 @@
  * LSPs are evil little bits of code that are allowed to inject into our
  * networking stack by Windows.  Once they have wormed into our process
  * they gnaw at our innards until we crash.  Here we force the buggers
  * into the light by recording them in our crash information.
  * We do the enumeration on a thread because I'm concerned about startup perf
  * on machines with several LSPs.
  */
 
-#if _WIN32_WINNT < 0x0600
-// Redefining _WIN32_WINNT for some Vista APIs that we call
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0600
-#endif
 #include "nsICrashReporter.h"
 #include "nsISupportsImpl.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 #include "nsQueryObject.h"
-#include "nsWindowsHelpers.h"
 #include <windows.h>
-#include <rpc.h>
 #include <ws2spi.h>
 
 namespace mozilla {
 namespace crashreporter {
 
 class LSPAnnotationGatherer : public nsRunnable
 {
   ~LSPAnnotationGatherer() {}
@@ -85,65 +78,26 @@ LSPAnnotationGatherer::Run()
   }
 
   nsCString str;
   for (int i = 0; i < n; i++) {
     AppendUTF16toUTF8(nsDependentString(providers[i].szProtocol), str);
     str.AppendLiteral(" : ");
     str.AppendInt(providers[i].iVersion);
     str.AppendLiteral(" : ");
-    str.AppendInt(providers[i].iAddressFamily);
-    str.AppendLiteral(" : ");
     str.AppendInt(providers[i].iSocketType);
     str.AppendLiteral(" : ");
-    str.AppendInt(providers[i].iProtocol);
-    str.AppendLiteral(" : ");
-    str.AppendPrintf("0x%x", providers[i].dwServiceFlags1);
-    str.AppendLiteral(" : ");
-    str.AppendPrintf("0x%x", providers[i].dwProviderFlags);
-    str.AppendLiteral(" : ");
 
     wchar_t path[MAX_PATH];
-    int pathLen = MAX_PATH;
-    if (!WSCGetProviderPath(&providers[i].ProviderId, path, &pathLen, &err)) {
+    int dummy;
+    if (!WSCGetProviderPath(&providers[i].ProviderId, path,
+                            &dummy, &err)) {
       AppendUTF16toUTF8(nsDependentString(path), str);
     }
 
-    str.AppendLiteral(" : ");
-    // If WSCGetProviderInfo is available, we should call it to obtain the
-    // category flags for this provider. When present, these flags inform
-    // Windows as to which order to chain the providers.
-    nsModuleHandle ws2_32(LoadLibraryW(L"ws2_32.dll"));
-    if (ws2_32) {
-      decltype(WSCGetProviderInfo)* pWSCGetProviderInfo =
-        reinterpret_cast<decltype(WSCGetProviderInfo)*>(
-            GetProcAddress(ws2_32, "WSCGetProviderInfo"));
-      if (pWSCGetProviderInfo) {
-        DWORD categoryInfo;
-        size_t categoryInfoSize = sizeof(categoryInfo);
-        if (!pWSCGetProviderInfo(&providers[i].ProviderId,
-                                 ProviderInfoLspCategories,
-                                 (PBYTE)&categoryInfo, &categoryInfoSize, 0,
-                                 &err)) {
-          str.AppendPrintf("0x%x", categoryInfo);
-        }
-      }
-    }
-
-    str.AppendLiteral(" : ");
-    if (providers[i].ProtocolChain.ChainLen <= BASE_PROTOCOL) {
-      // If we're dealing with a catalog entry that identifies an individual
-      // base or layer provider, log its provider GUID.
-      RPC_CSTR provIdStr = nullptr;
-      if (UuidToStringA(&providers[i].ProviderId, &provIdStr) == RPC_S_OK) {
-        str.Append(reinterpret_cast<char*>(provIdStr));
-        RpcStringFreeA(&provIdStr);
-      }
-    }
-
     if (i + 1 != n) {
       str.AppendLiteral(" \n ");
     }
   }
 
   mString = str;
   NS_DispatchToMainThread(NS_NewRunnableMethod(this, &LSPAnnotationGatherer::Annotate));
   return NS_OK;
--- a/widget/windows/moz.build
+++ b/widget/windows/moz.build
@@ -100,12 +100,8 @@ DEFINES['MOZ_UNICODE'] = True
 
 for var in ('MOZ_ENABLE_D3D10_LAYER'):
     if CONFIG[var]:
         DEFINES[var] = True
 
 RESFILE = 'widget.res'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
-
-OS_LIBS += [
-    'rpcrt4',
-]