Move char/wchar_t vectors to data partition.

Change-Id: I6a57c99569f3c480af2b2c19868f58083063449e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68896
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index 1ddc6c5..425ba6c 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -26,6 +26,7 @@
 #include "core/fpdfapi/parser/fpdf_parser_utility.h"
 #include "core/fxcrt/autorestorer.h"
 #include "core/fxcrt/fx_extension.h"
+#include "core/fxcrt/fx_memory_wrappers.h"
 #include "core/fxcrt/fx_safe_types.h"
 #include "third_party/base/ptr_util.h"
 #include "third_party/base/stl_util.h"
@@ -446,7 +447,7 @@
 
   out_objects->resize(new_size.ValueOrDie());
 
-  std::vector<char> buf(1024 * kEntryConstSize + 1);
+  std::vector<char, FxAllocAllocator<char>> buf(1024 * kEntryConstSize + 1);
   buf.back() = '\0';
 
   uint32_t nBytesToRead = count;
diff --git a/core/fxcrt/css/cfx_csstextbuf.h b/core/fxcrt/css/cfx_csstextbuf.h
index c504fa7..66db080 100644
--- a/core/fxcrt/css/cfx_csstextbuf.h
+++ b/core/fxcrt/css/cfx_csstextbuf.h
@@ -9,6 +9,7 @@
 
 #include <vector>
 
+#include "core/fxcrt/fx_memory_wrappers.h"
 #include "core/fxcrt/fx_string.h"
 
 class CFX_CSSTextBuf {
@@ -22,7 +23,7 @@
   WideStringView GetTrailingBlankTrimmedString() const;
 
  protected:
-  std::vector<wchar_t> m_Buffer;
+  std::vector<wchar_t, FxAllocAllocator<wchar_t>> m_Buffer;
 };
 
 #endif  // CORE_FXCRT_CSS_CFX_CSSTEXTBUF_H_
diff --git a/fxjs/cjs_document.cpp b/fxjs/cjs_document.cpp
index 62b6908..8f75375 100644
--- a/fxjs/cjs_document.cpp
+++ b/fxjs/cjs_document.cpp
@@ -18,6 +18,7 @@
 #include "core/fpdfapi/render/cpdf_pagerendercache.h"
 #include "core/fpdfdoc/cpdf_interactiveform.h"
 #include "core/fpdfdoc/cpdf_nametree.h"
+#include "core/fxcrt/fx_memory_wrappers.h"
 #include "fpdfsdk/cpdfsdk_annotiteration.h"
 #include "fpdfsdk/cpdfsdk_interactiveform.h"
 #include "fpdfsdk/cpdfsdk_pageview.h"
@@ -392,7 +393,8 @@
   if (IsExpandedParamKnown(newParams[5]))
     cMsg = pRuntime->ToWideString(newParams[5]);
 
-  std::vector<char> mutable_buf(sTextBuf.begin(), sTextBuf.end());
+  std::vector<char, FxAllocAllocator<char>> mutable_buf(sTextBuf.begin(),
+                                                        sTextBuf.end());
   pRuntime->BeginBlock();
   m_pFormFillEnv->JS_docmailForm(mutable_buf.data(), mutable_buf.size(), bUI,
                                  cTo, cSubject, cCc, cBcc, cMsg);