Commit 1a4c0307 authored by jun_fang's avatar jun_fang Committed by Commit bot

Fix an assert failure in CXFA_DefFontMgr::GetDefaultFont()

Font information (like size) is needed to perform layout
in the process of loading XFA documents. It was too late
to set g_last_instance_id so that XFA didn't get a font
by calling FontMap().

BUG=pdfium:349

Review URL: https://codereview.chromium.org/1615723003

Cr-Commit-Position: refs/heads/master@{#372196}
parent adf457dc
...@@ -606,6 +606,10 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Client* client) ...@@ -606,6 +606,10 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Client* client)
IFSDK_PAUSE::version = 1; IFSDK_PAUSE::version = 1;
IFSDK_PAUSE::user = NULL; IFSDK_PAUSE::user = NULL;
IFSDK_PAUSE::NeedToPauseNow = Pause_NeedToPauseNow; IFSDK_PAUSE::NeedToPauseNow = Pause_NeedToPauseNow;
#if defined(OS_LINUX)
g_last_instance_id = client_->GetPluginInstance()->pp_instance();
#endif
} }
PDFiumEngine::~PDFiumEngine() { PDFiumEngine::~PDFiumEngine() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment