Remove template JSEMethod<>.
This was originally intended to help simplify some of the
awkward macros in jse_define.h, but turns out to be awkward
itself.
Change-Id: Ic51882f245519d433398bb533bd8c3e0a22cbcc3
Reviewed-on: https://pdfium-review.googlesource.com/c/48610
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/xfa/jse_define.h b/fxjs/xfa/jse_define.h
index 5a63e72..b4056e9 100644
--- a/fxjs/xfa/jse_define.h
+++ b/fxjs/xfa/jse_define.h
@@ -13,23 +13,13 @@
class CFX_V8;
-template <class C,
- CJS_Result (C::*M)(CFX_V8* runtime,
- const std::vector<v8::Local<v8::Value>>& params)>
-CJS_Result JSEMethod(C* node,
- CFX_V8* runtime,
- const std::vector<v8::Local<v8::Value>>& params) {
- return (node->*M)(runtime, params);
-}
-
-#define JSE_METHOD(method_name) \
- static CJS_Result method_name##_static( \
- CJX_Object* node, CFX_V8* runtime, \
- const std::vector<v8::Local<v8::Value>>& params) { \
- return JSEMethod<Type__, &Type__::method_name>(static_cast<Type__*>(node), \
- runtime, params); \
- } \
- CJS_Result method_name(CFX_V8* runtime, \
+#define JSE_METHOD(method_name) \
+ static CJS_Result method_name##_static( \
+ CJX_Object* node, CFX_V8* runtime, \
+ const std::vector<v8::Local<v8::Value>>& params) { \
+ return static_cast<Type__*>(node)->method_name(runtime, params); \
+ } \
+ CJS_Result method_name(CFX_V8* runtime, \
const std::vector<v8::Local<v8::Value>>& params)
#define JSE_PROP(prop_name) \