зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 153591394598 (bug 1270686) for causing Windows 8 x64 opt e10s crashes on a CLOSED TREE
This commit is contained in:
Родитель
92c526f75d
Коммит
00f7f47247
|
@ -17,13 +17,10 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winternl.h>
|
#include <winternl.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#define PSAPI_VERSION 1
|
|
||||||
#include <psapi.h>
|
|
||||||
|
|
||||||
#pragma warning( push )
|
#pragma warning( push )
|
||||||
#pragma warning( disable : 4275 4530 ) // See msvc-stl-wrapper.template.h
|
#pragma warning( disable : 4275 4530 ) // See msvc-stl-wrapper.template.h
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
|
||||||
#pragma warning( pop )
|
#pragma warning( pop )
|
||||||
|
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
|
@ -546,15 +543,11 @@ static wchar_t* lastslash(wchar_t* s, int len)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NIGHTLY_BUILD
|
|
||||||
static std::vector<DllLoadInfo> gDllLoadInfos;
|
|
||||||
static LoadCallBackFn gLoadInfoCallback;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static NTSTATUS NTAPI
|
static NTSTATUS NTAPI
|
||||||
patched_LdrLoadDll (PWCHAR filePath, PULONG flags, PUNICODE_STRING moduleFileName, PHANDLE handle)
|
patched_LdrLoadDll (PWCHAR filePath, PULONG flags, PUNICODE_STRING moduleFileName, PHANDLE handle)
|
||||||
{
|
{
|
||||||
// We have UCS2 (UTF16?), we want ASCII, but we also just want the filename portion
|
// We have UCS2 (UTF16?), we want ASCII, but we also just want the filename portion
|
||||||
|
#define DLLNAME_MAX 128
|
||||||
char dllName[DLLNAME_MAX+1];
|
char dllName[DLLNAME_MAX+1];
|
||||||
wchar_t *dll_part;
|
wchar_t *dll_part;
|
||||||
char *dot;
|
char *dot;
|
||||||
|
@ -742,40 +735,14 @@ continue_loading:
|
||||||
return STATUS_DLL_NOT_FOUND;
|
return STATUS_DLL_NOT_FOUND;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NTSTATUS ret = stub_LdrLoadDll(filePath, flags, moduleFileName, handle);
|
|
||||||
#ifdef NIGHTLY_BUILD
|
return stub_LdrLoadDll(filePath, flags, moduleFileName, handle);
|
||||||
if (!ret) {
|
|
||||||
MODULEINFO moduleInfo;
|
|
||||||
if (GetModuleInformation(GetCurrentProcess(), *(HMODULE*)handle, &moduleInfo, sizeof(moduleInfo))) {
|
|
||||||
DllLoadInfo info;
|
|
||||||
strcpy(info.name, dllName);
|
|
||||||
info.lpBaseOfDll = moduleInfo.lpBaseOfDll;
|
|
||||||
info.SizeOfImage = moduleInfo.SizeOfImage;
|
|
||||||
if (gLoadInfoCallback) {
|
|
||||||
gLoadInfoCallback(info);
|
|
||||||
} else {
|
|
||||||
gDllLoadInfos.push_back(info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowsDllInterceptor NtDllIntercept;
|
WindowsDllInterceptor NtDllIntercept;
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#ifdef NIGHTLY_BUILD
|
|
||||||
MFBT_API void
|
|
||||||
RegisterDllLoadCallback(LoadCallBackFn aCallback) {
|
|
||||||
gLoadInfoCallback = aCallback;
|
|
||||||
for (DllLoadInfo &info : gDllLoadInfos) {
|
|
||||||
aCallback(info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
MFBT_API void
|
MFBT_API void
|
||||||
DllBlocklist_Initialize()
|
DllBlocklist_Initialize()
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,17 +34,5 @@ class MOZ_RAII AutoSetXPCOMLoadOnMainThread
|
||||||
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
|
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DLLNAME_MAX 128
|
|
||||||
#ifdef NIGHTLY_BUILD
|
|
||||||
struct DllLoadInfo
|
|
||||||
{
|
|
||||||
char name[DLLNAME_MAX+1];
|
|
||||||
LPVOID lpBaseOfDll;
|
|
||||||
DWORD SizeOfImage;
|
|
||||||
};
|
|
||||||
typedef void (*LoadCallBackFn)(DllLoadInfo&);
|
|
||||||
MFBT_API void RegisterDllLoadCallback(LoadCallBackFn);
|
|
||||||
#endif // NIGHTLY_BUILD
|
|
||||||
|
|
||||||
#endif // defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
|
#endif // defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
|
||||||
#endif // mozilla_windowsdllblocklist_h
|
#endif // mozilla_windowsdllblocklist_h
|
||||||
|
|
|
@ -52,7 +52,6 @@ if not CONFIG['JS_STANDALONE']:
|
||||||
]
|
]
|
||||||
DISABLE_STL_WRAPPING = True
|
DISABLE_STL_WRAPPING = True
|
||||||
OS_LIBS += [
|
OS_LIBS += [
|
||||||
'psapi',
|
|
||||||
'version',
|
'version',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -1437,17 +1437,6 @@ ChildFilter(void* context)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(XP_WIN) && defined(NIGHTLY_BUILD)
|
|
||||||
static void DllLoadCallback(DllLoadInfo& info)
|
|
||||||
{
|
|
||||||
nsAutoCString note;
|
|
||||||
note.AppendPrintf("%s-%p-%x\n", info.name, info.lpBaseOfDll, info.SizeOfImage);
|
|
||||||
|
|
||||||
CrashReporter::AppendAppNotesToCrashReport(note);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
nsresult SetExceptionHandler(nsIFile* aXREDirectory,
|
nsresult SetExceptionHandler(nsIFile* aXREDirectory,
|
||||||
bool force/*=false*/)
|
bool force/*=false*/)
|
||||||
{
|
{
|
||||||
|
@ -1685,10 +1674,6 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory,
|
||||||
|
|
||||||
mozalloc_set_oom_abort_handler(AnnotateOOMAllocationSize);
|
mozalloc_set_oom_abort_handler(AnnotateOOMAllocationSize);
|
||||||
|
|
||||||
#if defined(XP_WIN) && defined(NIGHTLY_BUILD)
|
|
||||||
RegisterDllLoadCallback(DllLoadCallback);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,10 +45,7 @@ function run_test()
|
||||||
function(mdump, extra) {
|
function(mdump, extra) {
|
||||||
do_check_eq(extra.TestKey, "TestValue");
|
do_check_eq(extra.TestKey, "TestValue");
|
||||||
do_check_eq(extra["\u2665"], "\u{1F4A9}");
|
do_check_eq(extra["\u2665"], "\u{1F4A9}");
|
||||||
// we spam the crash dumps with dlls loading so temporarily disable
|
do_check_eq(extra.Notes, "JunkMoreJunk");
|
||||||
// this check on windows
|
|
||||||
if (!is_windows)
|
|
||||||
do_check_eq(extra.Notes, "JunkMoreJunk");
|
|
||||||
do_check_true(!("TelemetrySessionId" in extra));
|
do_check_true(!("TelemetrySessionId" in extra));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче