summaryrefslogtreecommitdiff
path: root/fxjs/fxjse.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-12-11 22:01:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-11 22:01:08 +0000
commitcb22f9ad9265f40b1104ed2b09488ccc6ec9e5aa (patch)
tree4aaa14dfb0528268fb9a9a94a4cac82df1af4602 /fxjs/fxjse.h
parent731526e3b9f32ceac1cdac600fe3ecd55a0bc9b5 (diff)
downloadpdfium-cb22f9ad9265f40b1104ed2b09488ccc6ec9e5aa.tar.xz
[xfa] Refactor CJX method signatures.
This CL changes the CJX methods from void (*)(CFXJSE_Arguments*) to CJS_Return (*)(CJS_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) which is closer to how CJS works in practice. Change-Id: I3a3129268acfe4262dfeb04179919ed19f6c24e1 Reviewed-on: https://pdfium-review.googlesource.com/20491 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/fxjse.h')
-rw-r--r--fxjs/fxjse.h6
1 files changed, 5 insertions, 1 deletions
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<v8::Value>& 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);