Conditionalize FXGC init in fuzzers based on COMPONENT_BUILD

Broken at https://pdfium-review.googlesource.com/c/pdfium/+/74210,
which was only half-right.

Bug: chromium:1134485
Change-Id: I6fa4f9c8b2a18e13437f9f2dc479e965c60d888c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74372
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/testing/fuzzers/pdf_fuzzer_init_public.cc b/testing/fuzzers/pdf_fuzzer_init_public.cc
index c819cd2..a799c75 100644
--- a/testing/fuzzers/pdf_fuzzer_init_public.cc
+++ b/testing/fuzzers/pdf_fuzzer_init_public.cc
@@ -73,9 +73,13 @@
   v8::Isolate::CreateParams create_params;
   create_params.array_buffer_allocator = allocator_.get();
   isolate_.reset(v8::Isolate::New(create_params));
+#if defined(COMPONENT_BUILD)
+  // NOTE: FXGC_* calls are not exported, so we get a separate copy of FXGC
+  // instantiated in the _src targets of a component build. Initialize it, too.
+  FXGC_Initialize(platform_.get(), isolate_.get());
+#endif  // COMPONENT_BUILD
 #endif  // PDF_ENABLE_XFA
 #endif  // PDF_ENABLE_V8
-
   memset(&config_, '\0', sizeof(config_));
   config_.version = 3;
   config_.m_pUserFontPaths = nullptr;