Backed out changeset 5a566d2d6722 (bug 1490240)for build bustages on Unified_cpp_crashreporter0.obj CLOSED TREE

This commit is contained in:
arthur.iakab 2018-09-21 15:25:15 +03:00
parent 37759d8ccd
commit 12be75264f
11 changed files with 42 additions and 21 deletions

View File

@ -152,8 +152,8 @@ public:
return false;
}
return mPatchedFns.append(
reinterpret_cast<void*>(readOnlyTargetFn.GetBaseAddress()));
mPatchedFns.append(reinterpret_cast<void*>(readOnlyTargetFn.GetBaseAddress()));
return true;
}
bool WriteHook(const ReadOnlyTargetFunction<MMPolicyT>& aFn,
@ -169,7 +169,7 @@ public:
// Check that the 5 bytes before the function are NOP's or INT 3's,
const uint8_t nopOrBp[] = { 0x90, 0xCC };
if (!writableFn.template VerifyValuesAreOneOf<uint8_t, 5>(nopOrBp)) {
if (!writableFn.VerifyValuesAreOneOf<uint8_t, 5>(nopOrBp)) {
return false;
}
@ -184,8 +184,7 @@ public:
// (These look backwards because little-endian)
const uint16_t possibleEncodings[] = { 0xFF8B, 0xFF89 };
if (!writableFn.template VerifyValuesAreOneOf<uint16_t, 1>(
possibleEncodings, 5)) {
if (!writableFn.VerifyValuesAreOneOf<uint16_t, 1>(possibleEncodings, 5)) {
return false;
}

View File

@ -30,6 +30,9 @@ if CONFIG['OS_TARGET'] == 'Android':
'/toolkit/crashreporter/google-breakpad/src/common/android/include',
]
# We allow warnings for third-party code that can be updated from upstream.
AllowCompilerWarnings()
FINAL_LIBRARY = 'xul'
include('/toolkit/crashreporter/crashreporter.mozbuild')

View File

@ -11,6 +11,9 @@ UNIFIED_SOURCES += [
'minidump_generator.cc',
]
# We allow warnings for third-party code that can be updated from upstream.
AllowCompilerWarnings()
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [

View File

@ -283,8 +283,7 @@ static string FormatLastError()
}
else {
char buf[64];
sprintf(buf, "Unknown error, error code: 0x%08x",
static_cast<unsigned int>(err));
sprintf(buf, "Unknown error, error code: 0x%08x", err);
message += buf;
}
return message;
@ -349,6 +348,18 @@ static void SetDlgItemVisible(HWND hwndDlg, UINT item, bool visible)
ShowWindow(hwnd, visible ? SW_SHOW : SW_HIDE);
}
static void SetDlgItemDisabled(HWND hwndDlg, UINT item, bool disabled)
{
HWND hwnd = GetDlgItem(hwndDlg, item);
LONG style = GetWindowLong(hwnd, GWL_STYLE);
if (!disabled)
style |= WS_DISABLED;
else
style &= ~WS_DISABLED;
SetWindowLong(hwnd, GWL_STYLE, style);
}
/* === Crash Reporting Dialog === */
static void StretchDialog(HWND hwndDlg, int ydiff)

View File

@ -99,3 +99,6 @@ RCINCLUDE = 'crashreporter.rc'
DisableStlWrapping()
include('/toolkit/crashreporter/crashreporter.mozbuild')
if CONFIG['CC_TYPE'] == 'clang-cl':
AllowCompilerWarnings() # workaround for bug 1090497

View File

@ -42,6 +42,9 @@ SOURCES += [
Library('breakpad_mac_common_s')
# We allow warnings for third-party code that can be updated from upstream.
AllowCompilerWarnings()
FINAL_LIBRARY = 'xul'
CMFLAGS += ['-std=c99']

View File

@ -70,6 +70,9 @@ if CONFIG['OS_TARGET'] == 'Android':
Library('breakpad_common_s')
# We allow warnings for third-party code that can be updated from upstream.
AllowCompilerWarnings()
FINAL_LIBRARY = 'xul'
include('/toolkit/crashreporter/crashreporter.mozbuild')

View File

@ -141,3 +141,6 @@ crash_annotations.inputs = [
with Files('**'):
BUG_COMPONENT = ('Toolkit', 'Crash Reporting')
if CONFIG['CC_TYPE'] == 'clang-cl':
AllowCompilerWarnings() # workaround for bug 1090497

View File

@ -12,7 +12,6 @@
#include "nsDirectoryService.h"
#include "nsDataHashtable.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/EnumeratedRange.h"
#include "mozilla/Services.h"
#include "nsIObserverService.h"
@ -1330,8 +1329,6 @@ FreeBreakpadVM()
}
}
#if defined(XP_WIN)
/**
* Filters out floating point exceptions which are handled by nsSigHandlers.cpp
* and should not be handled as crashes.
@ -1382,8 +1379,6 @@ ChildFPEFilter(void* context, EXCEPTION_POINTERS* exinfo,
return result;
}
#endif // defined(XP_WIN)
static MINIDUMP_TYPE
GetMinidumpType()
{
@ -1433,8 +1428,6 @@ static bool ShouldReport()
return true;
}
#if !defined(XP_WIN)
static bool
Filter(void* context)
{
@ -1455,8 +1448,6 @@ ChildFilter(void* context)
return result;
}
#endif // !defined(XP_WIN)
static void
TerminateHandler()
{
@ -1671,10 +1662,9 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory,
// protect the crash reporter from being unloaded
gBlockUnhandledExceptionFilter = true;
gKernel32Intercept.Init("kernel32.dll");
DebugOnly<bool> ok =
stub_SetUnhandledExceptionFilter.Set(gKernel32Intercept,
"SetUnhandledExceptionFilter",
&patched_SetUnhandledExceptionFilter);
bool ok = stub_SetUnhandledExceptionFilter.Set(gKernel32Intercept,
"SetUnhandledExceptionFilter",
&patched_SetUnhandledExceptionFilter);
#ifdef DEBUG
if (!ok)

View File

@ -59,3 +59,6 @@ NO_PGO = True
# Temporary workaround for an issue in upstream breakpad
if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
CXXFLAGS += ['-wd4334']
if CONFIG['CC_TYPE'] == 'clang-cl':
AllowCompilerWarnings() # workaround for bug 1090497

View File

@ -176,7 +176,7 @@ void Crash(int16_t how)
auto pfnTest = m[how];
auto pfnLauncher = m[CRASH_X64CFI_LAUNCHER];
ReserveStack();
pfnLauncher(0, reinterpret_cast<void*>(pfnTest));
pfnLauncher(0, pfnTest);
break;
}
#endif // XP_WIN && HAVE_64BIT_BUILD && !defined(__MINGW32__)