diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2015-10-20 13:30:34 -0400 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2015-10-20 13:30:34 -0400 |
commit | 937840e1722d1f2b77d80575d6e710d760662c9c (patch) | |
tree | ff065615d6d91abe8e5c788da3a08386fc2d25d6 /core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp | |
parent | c29bee029cd5fe3f8a4ceb580235ac2d0e5ce8fd (diff) | |
download | pdfium-937840e1722d1f2b77d80575d6e710d760662c9c.tar.xz |
Revert "Add type cast definitions for CPDF_Dictionary."
This reverts commit 4816432671eef6467354aa252f22bb80acc315b7.
Reason, broke the javascript_test Rendering PDF file
/mnt/data/b/build/slave/linux/build/pdfium/out/Debug/gen/pdfium/testing/javascript/document_methods.pdf.
Non-linearized path...
FAILURE: document_methods.in; Command
'['/mnt/data/b/build/slave/linux/build/pdfium/out/Debug/pdfium_test',
'/mnt/data/b/build/slave/linux/build/pdfium/out/Debug/gen/pdfium/testing/javascript/document_methods.pdf']'
returned non-zero exit status -11
BUG=pdfium:201
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1412413002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp')
-rw-r--r-- | core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp index d66a9efdaa..224c99bb69 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp @@ -818,8 +818,8 @@ CPDF_Function* CPDF_Function::Load(CPDF_Object* pFuncObj) { type = ((CPDF_Stream*)pFuncObj) ->GetDict() ->GetInteger(FX_BSTRC("FunctionType")); - } else if (CPDF_Dictionary* pDict = pFuncObj->AsDictionary()) { - type = pDict->GetInteger(FX_BSTRC("FunctionType")); + } else if (pFuncObj->GetType() == PDFOBJ_DICTIONARY) { + type = ((CPDF_Dictionary*)pFuncObj)->GetInteger(FX_BSTRC("FunctionType")); } else { return NULL; } @@ -853,7 +853,7 @@ FX_BOOL CPDF_Function::Init(CPDF_Object* pObj) { if (pObj->GetType() == PDFOBJ_STREAM) { pDict = ((CPDF_Stream*)pObj)->GetDict(); } else { - pDict = pObj->AsDictionary(); + pDict = (CPDF_Dictionary*)pObj; } CPDF_Array* pDomains = pDict->GetArray(FX_BSTRC("Domain")); if (pDomains == NULL) { |