зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 31d1116ced93 (bug 1349444) for assertions on Windows a=backout
MozReview-Commit-ID: 4dOhE2GADv3
This commit is contained in:
Родитель
bb10f1e55f
Коммит
675c0065d0
|
@ -190,7 +190,6 @@ StackWalkInitCriticalAddress()
|
|||
#include <malloc.h>
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/StackWalk_windows.h"
|
||||
#include "nsWindowsDllInterceptor.h"
|
||||
|
||||
#include <imagehlp.h>
|
||||
// We need a way to know if we are building for WXP (or later), as if we are, we
|
||||
|
@ -226,20 +225,6 @@ CRITICAL_SECTION gDbgHelpCS;
|
|||
#ifdef _M_AMD64
|
||||
static uint8_t* sJitCodeRegionStart;
|
||||
static size_t sJitCodeRegionSize;
|
||||
|
||||
static WindowsDllInterceptor NtDllInterceptor;
|
||||
typedef NTSTATUS (NTAPI *LdrUnloadDll_func)(HMODULE module);
|
||||
static LdrUnloadDll_func stub_LdrUnloadDll;
|
||||
static NTSTATUS NTAPI
|
||||
patched_LdrUnloadDll(HMODULE module)
|
||||
{
|
||||
// Prevent the stack walker from suspending this thread when LdrUnloadDll
|
||||
// holds the RtlLookupFunctionEntry lock.
|
||||
AcquireStackWalkWorkaroundLock();
|
||||
NTSTATUS ret = stub_LdrUnloadDll(module);
|
||||
ReleaseStackWalkWorkaroundLock();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Routine to print an error message to standard error.
|
||||
|
@ -315,12 +300,6 @@ EnsureWalkThreadReady()
|
|||
stackWalkThread = nullptr;
|
||||
readyEvent = nullptr;
|
||||
|
||||
#ifdef _M_AMD64
|
||||
NtDllInterceptor.Init("ntdll.dll");
|
||||
NtDllInterceptor.AddHook("LdrUnloadDll",
|
||||
reinterpret_cast<intptr_t>(patched_LdrUnloadDll),
|
||||
(void**)&stub_LdrUnloadDll);
|
||||
#endif
|
||||
|
||||
::InitializeCriticalSection(&gDbgHelpCS);
|
||||
|
||||
|
|
|
@ -236,13 +236,6 @@ bool TestNtQueryFullAttributesFile(void* aFunc)
|
|||
return patchedNtQueryFullAttributesFile(0, 0) != 0;
|
||||
}
|
||||
|
||||
bool TestLdrUnloadDll(void* aFunc)
|
||||
{
|
||||
typedef NTSTATUS (NTAPI *LdrUnloadDllType)(HMODULE);
|
||||
auto patchedLdrUnloadDll = reinterpret_cast<LdrUnloadDllType>(aFunc);
|
||||
return patchedLdrUnloadDll(0) != 0;
|
||||
}
|
||||
|
||||
bool TestSetUnhandledExceptionFilter(void* aFunc)
|
||||
{
|
||||
auto patchedSetUnhandledExceptionFilter =
|
||||
|
@ -470,7 +463,6 @@ int main()
|
|||
TestHook(TestGetOpenFileNameW, "comdlg32.dll", "GetOpenFileNameW") &&
|
||||
#ifdef _M_X64
|
||||
TestHook(TestGetKeyState, "user32.dll", "GetKeyState") && // see Bug 1316415
|
||||
TestHook(TestLdrUnloadDll, "ntdll.dll", "LdrUnloadDll") &&
|
||||
#endif
|
||||
MaybeTestHook(ShouldTestTipTsf(), TestProcessCaretEvents, "tiptsf.dll", "ProcessCaretEvents") &&
|
||||
#ifdef _M_IX86
|
||||
|
|
Загрузка…
Ссылка в новой задаче