summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-18 09:28:49 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-18 16:49:47 +0000
commit41066c1ecaafd99904b160211985b56cce195ee8 (patch)
tree948ede9f04eb16cdf1f2c113493907ea25701b3e
parent45b9ae18668e996f90780880dd691d69fa13cbe1 (diff)
downloadpdfium-41066c1ecaafd99904b160211985b56cce195ee8.tar.xz
Bad cast to CPDF_Document in FPDFEditEmbeddertest
The test, as written, is only correct for the non-xfa case, where the FPDF_Document opaque type is equivalent to the CPDF_Document. Under XFA, however, there is another layer of indirection that the test harness needs to respect. Sorry, I missed this the first time around when I signed off on the CL that introduced this test. Change-Id: Ida3579edf639fbfca2939dc151c0420247e90ab3 Reviewed-on: https://pdfium-review.googlesource.com/5657 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r--fpdfsdk/fpdfedit_embeddertest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp
index 4559ee3f19..b10dacfc98 100644
--- a/fpdfsdk/fpdfedit_embeddertest.cpp
+++ b/fpdfsdk/fpdfedit_embeddertest.cpp
@@ -26,7 +26,7 @@ class FPDFEditEmbeddertest : public EmbedderTest, public TestSaver {
protected:
FPDF_DOCUMENT CreateNewDocument() {
document_ = FPDF_CreateNewDocument();
- cpdf_doc_ = static_cast<CPDF_Document*>(document_);
+ cpdf_doc_ = CPDFDocumentFromFPDFDocument(document_);
return document_;
}