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

Unified Diff: Source/wtf/FastMalloc.cpp

Issue 22084002: Eliminate HAVE(ERRNO_H) guard. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix author Created 7 years, 4 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 | « Source/wtf/DateMath.cpp ('k') | Source/wtf/Platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/FastMalloc.cpp
diff --git a/Source/wtf/FastMalloc.cpp b/Source/wtf/FastMalloc.cpp
index f2b882d7e90436101a99cff7980076da983615bd..d2545f7ef20dfda5e87192422e8184386e11b42b 100644
--- a/Source/wtf/FastMalloc.cpp
+++ b/Source/wtf/FastMalloc.cpp
@@ -411,14 +411,12 @@ extern "C" const int jscore_fastmalloc_introspection = 0;
#include "TCSpinLock.h"
#include "TCSystemAlloc.h"
#include <algorithm>
+#include <errno.h>
#include <pthread.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
-#if HAVE(ERRNO_H)
-#include <errno.h>
-#endif
#if OS(UNIX)
#include <unistd.h>
#endif
@@ -2962,12 +2960,10 @@ ALWAYS_INLINE void TCMalloc_Central_FreeList::Populate() {
if (span) pageheap->RegisterSizeClass(span, size_class_);
}
if (span == NULL) {
-#if HAVE(ERRNO_H)
- MESSAGE("allocation failed: %d\n", errno);
-#elif OS(WINDOWS)
+#if OS(WINDOWS)
MESSAGE("allocation failed: %d\n", ::GetLastError());
#else
- MESSAGE("allocation failed\n");
+ MESSAGE("allocation failed: %d\n", errno);
#endif
lock_.Lock();
return;
« no previous file with comments | « Source/wtf/DateMath.cpp ('k') | Source/wtf/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698