diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-23 13:36:00 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-23 13:36:00 -0700 |
commit | f1e7c461dfabbff6b65a072f24f6711b34159361 (patch) | |
tree | 3b0bb772a59669f06b86824a444fd06642592d4b /fpdfsdk/include/javascript/JS_Define.h | |
parent | 320b2313d19869333ed453af546e61a9fc2b81c9 (diff) | |
download | pdfium-f1e7c461dfabbff6b65a072f24f6711b34159361.tar.xz |
Revert "FX_BOOL considered harmful, part 2."
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9.
Reason for revert: build failure.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255693002 .
Diffstat (limited to 'fpdfsdk/include/javascript/JS_Define.h')
-rw-r--r-- | fpdfsdk/include/javascript/JS_Define.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h index 087f489126..f1b36bf3d0 100644 --- a/fpdfsdk/include/javascript/JS_Define.h +++ b/fpdfsdk/include/javascript/JS_Define.h @@ -51,7 +51,7 @@ struct JSMethodSpec /* ======================================== PROP CALLBACK ============================================ */ -template <class C, bool (C::*M)(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)> +template <class C, FX_BOOL (C::*M)(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)> void JSPropGetter(const char* prop_name_string, const char* class_name_string, v8::Local<v8::String> property, @@ -74,7 +74,7 @@ void JSPropGetter(const char* prop_name_string, info.GetReturnValue().Set((v8::Local<v8::Value>)value); } -template <class C, bool (C::*M)(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)> +template <class C, FX_BOOL (C::*M)(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)> void JSPropSetter(const char* prop_name_string, const char* class_name_string, v8::Local<v8::String> property, @@ -113,7 +113,7 @@ void JSPropSetter(const char* prop_name_string, /* ========================================= METHOD CALLBACK =========================================== */ -template <class C, bool (C::*M)(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)> +template <class C, FX_BOOL (C::*M)(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)> void JSMethod(const char* method_name_string, const char* class_name_string, const v8::FunctionCallbackInfo<v8::Value>& info) { @@ -240,7 +240,7 @@ void JSSpecialPropQuery(const char *, v8::Local<v8::String> property,const v8::P CFX_WideString propname = CFX_WideString::FromUTF8(*utf8_value, utf8_value.length()); CJS_Object* pJSObj = reinterpret_cast<CJS_Object*>(JS_GetPrivate(isolate, info.Holder())); Alt* pObj = reinterpret_cast<Alt*>(pJSObj->GetEmbedObject()); - bool bRet = pObj->QueryProperty(propname.c_str()); + FX_BOOL bRet = pObj->QueryProperty(propname.c_str()); info.GetReturnValue().Set(bRet ? 4 : 0); } @@ -382,7 +382,7 @@ int js_class_name::Init(IJS_Runtime* pRuntime, FXJSOBJTYPE eObjType)\ /* ======================================== GLOBAL METHODS ============================================ */ -template <bool (*F)(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)> +template <FX_BOOL (*F)(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError)> void JSGlobalFunc(const char *func_name_string, const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Isolate* isolate = info.GetIsolate(); |