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

This commit is contained in:
Wes Kocher 2016-01-08 14:42:37 -08:00
parent 9d2d25c7b2
commit 9087c3a9a8
2 changed files with 3 additions and 53 deletions

View File

@ -11,19 +11,12 @@
* 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 {
@ -90,55 +83,16 @@ LSPAnnotationGatherer::Run()
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 ");
}

View File

@ -105,7 +105,3 @@ for var in ('MOZ_ENABLE_D3D10_LAYER'):
RESFILE = 'widget.res'
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
OS_LIBS += [
'rpcrt4',
]