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/Annot.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fpdfsdk/javascript/Annot.h') diff --git a/fpdfsdk/javascript/Annot.h b/fpdfsdk/javascript/Annot.h index dffa713c4d..d9757fa514 100644 --- a/fpdfsdk/javascript/Annot.h +++ b/fpdfsdk/javascript/Annot.h @@ -17,9 +17,9 @@ class Annot : public CJS_EmbedObj { explicit Annot(CJS_Object* pJSObject); ~Annot() override; - bool hidden(IJS_EventContext* cc, CJS_PropValue& vp, CFX_WideString& sError); - bool name(IJS_EventContext* cc, CJS_PropValue& vp, CFX_WideString& sError); - bool type(IJS_EventContext* cc, CJS_PropValue& vp, CFX_WideString& sError); + bool hidden(CJS_Runtime* pRuntime, CJS_PropValue& vp, CFX_WideString& sError); + bool name(CJS_Runtime* pRuntime, CJS_PropValue& vp, CFX_WideString& sError); + bool type(CJS_Runtime* pRuntime, CJS_PropValue& vp, CFX_WideString& sError); void SetSDKAnnot(CPDFSDK_BAAnnot* annot); -- cgit v1.2.3