mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 950856 - Fail the build if you attempt to use NS_StackWalk on Windows where it won't work; r=froydnj,BenWa
--HG-- extra : rebase_source : 914250c939e4666f4a8630f7e9e57e466b669259
This commit is contained in:
parent
2f559956a1
commit
54a364d5ac
@ -110,7 +110,6 @@ UNIFIED_SOURCES += [
|
|||||||
'nsMemoryReporterManager.cpp',
|
'nsMemoryReporterManager.cpp',
|
||||||
'nsMessageLoop.cpp',
|
'nsMessageLoop.cpp',
|
||||||
'nsSecurityConsoleMessage.cpp',
|
'nsSecurityConsoleMessage.cpp',
|
||||||
'nsStackWalk.cpp',
|
|
||||||
'nsSystemInfo.cpp',
|
'nsSystemInfo.cpp',
|
||||||
'nsTraceRefcntImpl.cpp',
|
'nsTraceRefcntImpl.cpp',
|
||||||
'nsUUIDGenerator.cpp',
|
'nsUUIDGenerator.cpp',
|
||||||
@ -118,6 +117,17 @@ UNIFIED_SOURCES += [
|
|||||||
'VisualEventTracer.cpp',
|
'VisualEventTracer.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# On Windows, NS_StackWalk will only work correctly if we have frame pointers available.
|
||||||
|
# That will only be true for non-optimized builds, and for optimized builds with
|
||||||
|
# --enable-profiling in the .mozconfig (which is turned on in Nightly by default.)
|
||||||
|
# We exclude this file from other build configurations so that if somebody adds a
|
||||||
|
# new usage of NS_StackWalk it will cause a link error, which is better than having
|
||||||
|
# NS_StackWalk silently return garbage at runtime.
|
||||||
|
if CONFIG['OS_TARGET'] != 'WINNT' or (not CONFIG['MOZ_OPTIMIZE'] or CONFIG['MOZ_PROFILING']):
|
||||||
|
UNIFIED_SOURCES += [
|
||||||
|
'nsStackWalk.cpp',
|
||||||
|
]
|
||||||
|
|
||||||
if CONFIG['OS_ARCH'] == 'Linux':
|
if CONFIG['OS_ARCH'] == 'Linux':
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
'SystemMemoryReporter.cpp',
|
'SystemMemoryReporter.cpp',
|
||||||
|
@ -34,6 +34,10 @@
|
|||||||
|
|
||||||
#include "LateWriteChecks.h"
|
#include "LateWriteChecks.h"
|
||||||
|
|
||||||
|
#if !defined(XP_WIN) || (!defined(MOZ_OPTIMIZE) || defined(MOZ_PROFILING))
|
||||||
|
#define OBSERVE_LATE_WRITES
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
/*************************** Auxiliary Declarations ***************************/
|
/*************************** Auxiliary Declarations ***************************/
|
||||||
@ -106,6 +110,7 @@ private:
|
|||||||
|
|
||||||
void LateWriteObserver::Observe(IOInterposeObserver::Observation& aOb)
|
void LateWriteObserver::Observe(IOInterposeObserver::Observation& aOb)
|
||||||
{
|
{
|
||||||
|
#ifdef OBSERVE_LATE_WRITES
|
||||||
// Crash if that is the shutdown check mode
|
// Crash if that is the shutdown check mode
|
||||||
if (gShutdownChecks == SCM_CRASH) {
|
if (gShutdownChecks == SCM_CRASH) {
|
||||||
MOZ_CRASH();
|
MOZ_CRASH();
|
||||||
@ -201,6 +206,7 @@ void LateWriteObserver::Observe(IOInterposeObserver::Observation& aOb)
|
|||||||
}
|
}
|
||||||
PR_Delete(finalName.get());
|
PR_Delete(finalName.get());
|
||||||
PR_Rename(name, finalName.get());
|
PR_Rename(name, finalName.get());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************* Setup/Teardown *******************************/
|
/******************************* Setup/Teardown *******************************/
|
||||||
|
@ -75,3 +75,6 @@ DEFINES['OMNIJAR_NAME'] = CONFIG['OMNIJAR_NAME']
|
|||||||
|
|
||||||
if CONFIG['TARGET_XPCOM_ABI']:
|
if CONFIG['TARGET_XPCOM_ABI']:
|
||||||
DEFINES['TARGET_XPCOM_ABI'] = '"%s"' % CONFIG['TARGET_XPCOM_ABI']
|
DEFINES['TARGET_XPCOM_ABI'] = '"%s"' % CONFIG['TARGET_XPCOM_ABI']
|
||||||
|
|
||||||
|
if CONFIG['MOZ_OPTIMIZE']:
|
||||||
|
DEFINES['MOZ_OPTIMIZE'] = True
|
||||||
|
Loading…
Reference in New Issue
Block a user