From cb22f9ad9265f40b1104ed2b09488ccc6ec9e5aa Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 11 Dec 2017 22:01:08 +0000 Subject: [xfa] Refactor CJX method signatures. This CL changes the CJX methods from void (*)(CFXJSE_Arguments*) to CJS_Return (*)(CJS_V8* runtime, const std::vector>& params) which is closer to how CJS works in practice. Change-Id: I3a3129268acfe4262dfeb04179919ed19f6c24e1 Reviewed-on: https://pdfium-review.googlesource.com/20491 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- fxjs/fxjse.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fxjs/fxjse.h') diff --git a/fxjs/fxjse.h b/fxjs/fxjse.h index df1dff6243..873fcf50d2 100644 --- a/fxjs/fxjse.h +++ b/fxjs/fxjse.h @@ -13,6 +13,7 @@ class CFXJSE_Arguments; class CFXJSE_Value; +class CJS_Return; // C++ object which is retrieved from v8 object's slot. class CFXJSE_HostObject { @@ -30,6 +31,9 @@ class CFXJSE_HostObject { Type type_; }; +typedef CJS_Return (*FXJSE_MethodCallback)( + const v8::FunctionCallbackInfo& info, + const WideString& functionName); typedef void (*FXJSE_FuncCallback)(CFXJSE_Value* pThis, const ByteStringView& szFuncName, CFXJSE_Arguments& args); @@ -58,7 +62,7 @@ struct FXJSE_CLASS_DESCRIPTOR { FXJSE_PropTypeGetter dynPropTypeGetter; FXJSE_PropAccessor dynPropGetter; FXJSE_PropAccessor dynPropSetter; - FXJSE_FuncCallback dynMethodCall; + FXJSE_MethodCallback dynMethodCall; }; void FXJSE_ThrowMessage(const ByteStringView& utf8Message); -- cgit v1.2.3