From 71a7d377ff36a0be1af1848d5cac0ccb83ae725d Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Thu, 1 Feb 2018 17:07:13 +0000 Subject: Deprecate FPDFDest_GetPageIndex and create a fixed version. FPDFDest_GetDestPageIndex() has a well defined return value for errors (-1). Keeping FPDFDest_GetPageIndex() to avoid changing behavior of the old API for whoever relies on it. Bug: pdfium:938 Change-Id: Iad528923cb156e957a419540c262a65f45cb777d Reviewed-on: https://pdfium-review.googlesource.com/24811 Commit-Queue: Henrique Nakashima Reviewed-by: Lei Zhang --- fxjs/cjs_document.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fxjs') diff --git a/fxjs/cjs_document.cpp b/fxjs/cjs_document.cpp index 76d3f18b40..9af0f07f75 100644 --- a/fxjs/cjs_document.cpp +++ b/fxjs/cjs_document.cpp @@ -1467,8 +1467,8 @@ CJS_Return Document::gotoNamedDest( scrollPositionArray.push_back(arrayObject->GetFloatAt(i)); } pRuntime->BeginBlock(); - m_pFormFillEnv->DoGoToAction(dest.GetPageIndex(pDocument), dest.GetZoomMode(), - scrollPositionArray.data(), + m_pFormFillEnv->DoGoToAction(dest.GetPageIndexDeprecated(pDocument), + dest.GetZoomMode(), scrollPositionArray.data(), scrollPositionArray.size()); pRuntime->EndBlock(); return CJS_Return(true); -- cgit v1.2.3