From b1670b5cca9a59dfb612ef9eb891a70dd716bf9c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 16 Feb 2017 17:01:00 -0800 Subject: Pass CJS_Runtime to JS callbacks. This is much more convenient, since only a fraction of them need an IJS_EventContext, which can be obtained from the CJS_Runtime. Make GetCurrentEventContext() specific to CJS_Runtime, and return the concrete type. This saves a lot of casting. Change-Id: If79a3bcbf44de513f3caace153099234cc313d47 Reviewed-on: https://pdfium-review.googlesource.com/2793 Commit-Queue: dsinclair Reviewed-by: dsinclair --- fpdfsdk/javascript/report.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/javascript/report.cpp') diff --git a/fpdfsdk/javascript/report.cpp b/fpdfsdk/javascript/report.cpp index 87ed416b05..2cb123ab71 100644 --- a/fpdfsdk/javascript/report.cpp +++ b/fpdfsdk/javascript/report.cpp @@ -29,7 +29,7 @@ Report::Report(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {} Report::~Report() {} -bool Report::writeText(IJS_EventContext* cc, +bool Report::writeText(CJS_Runtime* pRuntime, const std::vector& params, CJS_Value& vRet, CFX_WideString& sError) { @@ -37,7 +37,7 @@ bool Report::writeText(IJS_EventContext* cc, return true; } -bool Report::save(IJS_EventContext* cc, +bool Report::save(CJS_Runtime* pRuntime, const std::vector& params, CJS_Value& vRet, CFX_WideString& sError) { -- cgit v1.2.3