From 892d7510db7015b1835d8e057a716518881f126d Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 21 Feb 2017 13:57:13 -0800 Subject: Avoid some widestring to bytestring conversions in fxjs. None of the names have non-ascii characters. Change-Id: I83a52d6276edf2f442fca33221f38f6a53c3ffe3 Reviewed-on: https://pdfium-review.googlesource.com/2816 Commit-Queue: Tom Sepez Reviewed-by: dsinclair --- fpdfsdk/javascript/JS_Define.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/javascript/JS_Define.h b/fpdfsdk/javascript/JS_Define.h index 6ad00632d3..4f5cc5d66e 100644 --- a/fpdfsdk/javascript/JS_Define.h +++ b/fpdfsdk/javascript/JS_Define.h @@ -34,8 +34,6 @@ struct JSMethodSpec { v8::FunctionCallback pMethodCall; }; -#define JS_WIDESTRING(widestring) L## #widestring - template void JSPropGetter(const char* prop_name_string, const char* class_name_string, @@ -141,13 +139,13 @@ void JSMethod(const char* method_name_string, // All JS classes have a name, an object defintion ID, and the ability to // register themselves with FXJS_V8. We never make a BASE class on its own // because it can't really do anything. -#define DECLARE_JS_CLASS_BASE_PART() \ - static const wchar_t* g_pClassName; \ - static int g_nObjDefnID; \ +#define DECLARE_JS_CLASS_BASE_PART() \ + static const char* g_pClassName; \ + static int g_nObjDefnID; \ static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); -#define IMPLEMENT_JS_CLASS_BASE_PART(js_class_name, class_name) \ - const wchar_t* js_class_name::g_pClassName = JS_WIDESTRING(class_name); \ +#define IMPLEMENT_JS_CLASS_BASE_PART(js_class_name, class_name) \ + const char* js_class_name::g_pClassName = #class_name; \ int js_class_name::g_nObjDefnID = -1; // CONST classes provide constants, but not constructors, methods, or props. -- cgit v1.2.3