Move uint8_t vectors to data partition in fxjs/

Change-Id: I11d115960e2c3490cf56c39da6009aced3dec6bd
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68353
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fxjs/cfx_globaldata_unittest.cpp b/fxjs/cfx_globaldata_unittest.cpp
index 3eb0ac4..b0e4253 100644
--- a/fxjs/cfx_globaldata_unittest.cpp
+++ b/fxjs/cfx_globaldata_unittest.cpp
@@ -17,17 +17,19 @@
   ~TestDelegate() override {}
 
   bool StoreBuffer(pdfium::span<const uint8_t> buffer) override {
-    last_buffer_ = std::vector<uint8_t>(buffer.begin(), buffer.end());
+    last_buffer_ = std::vector<uint8_t, FxAllocAllocator<uint8_t>>(
+        buffer.begin(), buffer.end());
     return true;
   }
   Optional<pdfium::span<uint8_t>> LoadBuffer() override {
     return pdfium::span<uint8_t>(last_buffer_);
   }
   void BufferDone() override {
-    last_buffer_ = std::vector<uint8_t>();  // Catch misuse after done.
+    // Catch misuse after done.
+    last_buffer_ = std::vector<uint8_t, FxAllocAllocator<uint8_t>>();
   }
 
-  std::vector<uint8_t> last_buffer_;
+  std::vector<uint8_t, FxAllocAllocator<uint8_t>> last_buffer_;
 };
 
 }  // namespace
diff --git a/fxjs/cjs_app.cpp b/fxjs/cjs_app.cpp
index 992fd98..36dece0 100644
--- a/fxjs/cjs_app.cpp
+++ b/fxjs/cjs_app.cpp
@@ -542,7 +542,7 @@
     swLabel = pRuntime->ToWideString(newParams[4]);
 
   const int MAX_INPUT_BYTES = 2048;
-  std::vector<uint8_t> pBuff(MAX_INPUT_BYTES + 2);
+  std::vector<uint8_t, FxAllocAllocator<uint8_t>> pBuff(MAX_INPUT_BYTES + 2);
   int nLengthBytes = pRuntime->GetFormFillEnv()->JS_appResponse(
       swQuestion, swTitle, swDefault, swLabel, bPassword, pBuff.data(),
       MAX_INPUT_BYTES);
diff --git a/fxjs/xfa/cfxjse_formcalc_context.cpp b/fxjs/xfa/cfxjse_formcalc_context.cpp
index b24673b..507b9fe 100644
--- a/fxjs/xfa/cfxjse_formcalc_context.cpp
+++ b/fxjs/xfa/cfxjse_formcalc_context.cpp
@@ -4456,7 +4456,7 @@
     return;
 
   int32_t size = pFile->GetSize();
-  std::vector<uint8_t> dataBuf(size);
+  std::vector<uint8_t, FxAllocAllocator<uint8_t>> dataBuf(size);
   pFile->ReadBlock(dataBuf.data(), size);
   info.GetReturnValue().Set(
       fxv8::NewStringHelper(info.GetIsolate(), ByteStringView(dataBuf)));