From 80435cb746fa7bd22cf062ab39829ec86000fd21 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 24 Oct 2017 21:40:24 -0400 Subject: Convert JS input params to v8::Local>s This CL converts the JS set_* methods and the JSMethod methods to accept v8::Local objects instead of CJS_Value objects. Change-Id: I6de41305deff458eba515bdc3462522b502f74ad Reviewed-on: https://pdfium-review.googlesource.com/16670 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- fpdfsdk/javascript/app.h | 70 +++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 34 deletions(-) (limited to 'fpdfsdk/javascript/app.h') diff --git a/fpdfsdk/javascript/app.h b/fpdfsdk/javascript/app.h index 666ee12606..967e9d7526 100644 --- a/fpdfsdk/javascript/app.h +++ b/fpdfsdk/javascript/app.h @@ -45,154 +45,156 @@ class app : public CJS_EmbedObj { CJS_Value* vp, WideString* sError); bool set_active_docs(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool get_calculate(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); bool set_calculate(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool get_forms_version(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); bool set_forms_version(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool get_fs(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); - bool set_fs(CJS_Runtime* pRuntime, const CJS_Value& vp, WideString* sError); + bool set_fs(CJS_Runtime* pRuntime, + v8::Local vp, + WideString* sError); bool get_fullscreen(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); bool set_fullscreen(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool get_language(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); bool set_language(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool get_media(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); bool set_media(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool get_platform(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); bool set_platform(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool get_runtime_highlight(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); bool set_runtime_highlight(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool get_viewer_type(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); bool set_viewer_type(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool get_viewer_variation(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); bool set_viewer_variation(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool get_viewer_version(CJS_Runtime* pRuntime, CJS_Value* vp, WideString* sError); bool set_viewer_version(CJS_Runtime* pRuntime, - const CJS_Value& vp, + v8::Local vp, WideString* sError); bool alert(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool beep(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool browseForDoc(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool clearInterval(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool clearTimeOut(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool execDialog(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool execMenuItem(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool findComponent(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool goBack(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool goForward(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool launchURL(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool mailMsg(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool newFDF(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool newDoc(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool openDoc(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool openFDF(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool popUpMenuEx(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool popUpMenu(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool response(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool setInterval(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); bool setTimeOut(CJS_Runtime* pRuntime, - const std::vector& params, + const std::vector>& params, CJS_Value& vRet, WideString& sError); @@ -205,7 +207,7 @@ class app : public CJS_EmbedObj { // CJS_EmbedObj void RunJsScript(CJS_Runtime* pRuntime, const WideString& wsScript); - void ClearTimerCommon(CJS_Runtime* pRuntime, const CJS_Value& param); + void ClearTimerCommon(CJS_Runtime* pRuntime, v8::Local param); bool m_bCalculate; bool m_bRuntimeHighLight; -- cgit v1.2.3