From ed099befbb300d6f9c393cb415fdb2a68c2ef471 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 15 May 2015 16:30:52 -0700 Subject: Merge to XFA: Abort on OOM by default in FX_Alloc(). Original Review URL: https://codereview.chromium.org/1128043009 Original Review URL: https://codereview.chromium.org/1142463005 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1144683002 --- core/include/fxcrt/fx_system.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'core/include/fxcrt/fx_system.h') diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h index 9cc165f7a5..96030ca551 100644 --- a/core/include/fxcrt/fx_system.h +++ b/core/include/fxcrt/fx_system.h @@ -6,10 +6,12 @@ #ifndef _FX_SYSTEM_H_ #define _FX_SYSTEM_H_ + #define _FX_WIN32_DESKTOP_ 1 #define _FX_LINUX_DESKTOP_ 4 #define _FX_MACOSX_ 7 #define _FX_ANDROID_ 12 + #define _FXM_PLATFORM_WINDOWS_ 1 #define _FXM_PLATFORM_LINUX_ 2 #define _FXM_PLATFORM_APPLE_ 3 @@ -341,12 +343,20 @@ int FXSYS_round(FX_FLOAT f); #define PRIuS "zu" #endif -#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#else // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ #if !defined(PRIuS) #define PRIuS "Iu" #endif -#endif +#endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ -#endif +// Prevent a function from ever being inlined, typically because we'd +// like it to appear in stack traces. +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#define NEVER_INLINE __declspec(noinline) +#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#define NEVER_INLINE __attribute__((__noinline__)) +#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ + +#endif // _FX_SYSTEM_H_ -- cgit v1.2.3