[pdfium] Set up cppgc before V8 isolate
To allow V8 to use cppgc, cppgc has to be initialized before the initialization of the V8 isolate. This CL changes the initialization order in pdfium accordingly. Bug: 42203693 Change-Id: Icb781c372bc3006dd2572621a36873b3b54224ee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6276532 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#1421296}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
b807c89790
commit
46360dd8b6
@ -275,6 +275,9 @@ bool IsV8Initialized() {
|
||||
}
|
||||
|
||||
void SetUpV8() {
|
||||
#if defined(PDF_ENABLE_XFA)
|
||||
gin::InitializeCppgcFromV8Platform();
|
||||
#endif
|
||||
if (!gin::IsolateHolder::Initialized()) {
|
||||
// TODO(crbug.com/40142415): V8 flags for the PDF Viewer need to be set up
|
||||
// as soon as the renderer process is created in the constructor of
|
||||
@ -292,10 +295,6 @@ void SetUpV8() {
|
||||
new gin::IsolateHolder(base::SingleThreadTaskRunner::GetCurrentDefault(),
|
||||
gin::IsolateHolder::kSingleThread,
|
||||
gin::IsolateHolder::IsolateType::kUtility);
|
||||
|
||||
#if defined(PDF_ENABLE_XFA)
|
||||
gin::InitializeCppgcFromV8Platform();
|
||||
#endif
|
||||
}
|
||||
|
||||
void TearDownV8() {
|
||||
|
Reference in New Issue
Block a user