Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: core/include/fxcrt/fx_system.h

Issue 1128043009: Abort on OOM by default in FX_Alloc() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, 2015. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fxcrt/fx_memory.h ('k') | core/src/fxcodec/codec/fx_codec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fxcrt/fx_system.h
diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h
index 9cc165f7a5b83de0cd34b77f039daf8fb2918f83..96030ca551e3f496bb3c5197da91f44703648c99 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_
« no previous file with comments | « core/include/fxcrt/fx_memory.h ('k') | core/src/fxcodec/codec/fx_codec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698