Reduce includes in fx_memory.h.

Now that https://pdfium.googlesource.com/pdfium/+/fec33412 removed the
inlining in fx_memory.h, remove the unused headers and fix up code that
needs to do IWYU.

Change-Id: Id96f21700918b03b17cb875f7e9240ad40b11210
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62475
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxcodec/basic/basicmodule.cpp b/core/fxcodec/basic/basicmodule.cpp
index 1aadc6d..d495454 100644
--- a/core/fxcodec/basic/basicmodule.cpp
+++ b/core/fxcodec/basic/basicmodule.cpp
@@ -8,6 +8,7 @@
 #include <utility>
 
 #include "core/fxcodec/scanlinedecoder.h"
+#include "core/fxcrt/fx_safe_types.h"
 #include "third_party/base/ptr_util.h"
 
 namespace fxcodec {
diff --git a/core/fxcrt/fx_memory.cpp b/core/fxcrt/fx_memory.cpp
index 0048bfd..1ed4949 100644
--- a/core/fxcrt/fx_memory.cpp
+++ b/core/fxcrt/fx_memory.cpp
@@ -8,6 +8,8 @@
 
 #include <stdlib.h>  // For abort().
 
+#include <limits>
+
 #include "build/build_config.h"
 #include "core/fxcrt/fx_safe_types.h"
 #include "third_party/base/debug/alias.h"
diff --git a/core/fxcrt/fx_memory.h b/core/fxcrt/fx_memory.h
index 73558f5..95c204a 100644
--- a/core/fxcrt/fx_memory.h
+++ b/core/fxcrt/fx_memory.h
@@ -7,8 +7,7 @@
 #ifndef CORE_FXCRT_FX_MEMORY_H_
 #define CORE_FXCRT_FX_MEMORY_H_
 
-#include "core/fxcrt/fx_system.h"
-#include "third_party/base/compiler_specific.h"
+#include <stddef.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -23,12 +22,6 @@
 #ifdef __cplusplus
 }  // extern "C"
 
-#include <stdlib.h>
-#include <limits>
-#include <memory>
-#include <new>
-
-#include "core/fxcrt/fx_safe_types.h"
 #include "third_party/base/allocator/partition_allocator/partition_alloc.h"
 
 pdfium::base::PartitionAllocatorGeneric& GetArrayBufferPartitionAllocator();