Backed out changeset 5b18b53232b8 (bug 1355559) for assertions on Windows

MozReview-Commit-ID: G2UXc5l6b2T
This commit is contained in:
Wes Kocher 2017-04-25 15:51:33 -07:00
parent bf1d6ef1c2
commit bb10f1e55f
2 changed files with 0 additions and 36 deletions

View File

@ -240,26 +240,6 @@ patched_LdrUnloadDll(HMODULE module)
ReleaseStackWalkWorkaroundLock();
return ret;
}
// These pointers are disguised as PVOID to avoid pulling in obscure headers
typedef PVOID (WINAPI *LdrResolveDelayLoadedAPI_func)(PVOID ParentModuleBase,
PVOID DelayloadDescriptor, PVOID FailureDllHook, PVOID FailureSystemHook,
PVOID ThunkAddress, ULONG Flags);
static LdrResolveDelayLoadedAPI_func stub_LdrResolveDelayLoadedAPI;
static PVOID WINAPI patched_LdrResolveDelayLoadedAPI(PVOID ParentModuleBase,
PVOID DelayloadDescriptor, PVOID FailureDllHook, PVOID FailureSystemHook,
PVOID ThunkAddress, ULONG Flags)
{
// Prevent the stack walker from suspending this thread when
// LdrResolveDelayLoadAPI holds the RtlLookupFunctionEntry lock.
AcquireStackWalkWorkaroundLock();
PVOID ret = stub_LdrResolveDelayLoadedAPI(ParentModuleBase, DelayloadDescriptor,
FailureDllHook, FailureSystemHook,
ThunkAddress, Flags);
ReleaseStackWalkWorkaroundLock();
return ret;
}
#endif
// Routine to print an error message to standard error.
@ -340,9 +320,6 @@ EnsureWalkThreadReady()
NtDllInterceptor.AddHook("LdrUnloadDll",
reinterpret_cast<intptr_t>(patched_LdrUnloadDll),
(void**)&stub_LdrUnloadDll);
NtDllInterceptor.AddHook("LdrResolveDelayLoadedAPI",
reinterpret_cast<intptr_t>(patched_LdrResolveDelayLoadedAPI),
(void**)&stub_LdrResolveDelayLoadedAPI);
#endif
::InitializeCriticalSection(&gDbgHelpCS);

View File

@ -243,18 +243,6 @@ bool TestLdrUnloadDll(void* aFunc)
return patchedLdrUnloadDll(0) != 0;
}
bool TestLdrResolveDelayLoadedAPI(void* aFunc)
{
// These pointers are disguised as PVOID to avoid pulling in obscure headers
typedef PVOID (WINAPI *LdrResolveDelayLoadedAPIType)(PVOID, PVOID, PVOID,
PVOID, PVOID, ULONG);
auto patchedLdrResolveDelayLoadedAPI =
reinterpret_cast<LdrResolveDelayLoadedAPIType>(aFunc);
// No idea how to call this API. Flags==99 is just an arbitrary number that
// doesn't crash when the other params are null.
return patchedLdrResolveDelayLoadedAPI(0, 0, 0, 0, 0, 99) == 0;
}
bool TestSetUnhandledExceptionFilter(void* aFunc)
{
auto patchedSetUnhandledExceptionFilter =
@ -483,7 +471,6 @@ int main()
#ifdef _M_X64
TestHook(TestGetKeyState, "user32.dll", "GetKeyState") && // see Bug 1316415
TestHook(TestLdrUnloadDll, "ntdll.dll", "LdrUnloadDll") &&
TestHook(TestLdrResolveDelayLoadedAPI, "ntdll.dll", "LdrResolveDelayLoadedAPI") &&
#endif
MaybeTestHook(ShouldTestTipTsf(), TestProcessCaretEvents, "tiptsf.dll", "ProcessCaretEvents") &&
#ifdef _M_IX86