summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/PublicMethods.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-25 13:30:31 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-25 18:40:45 +0000
commit8f524d6ff9c5c5e07388438e58aca7dc39f43a1f (patch)
treeec73d24ebdfb84e0c9a254a35912edc5ab54dae7 /fpdfsdk/javascript/PublicMethods.h
parent2474a3b2d9fe987dac58813771f1fa66427e124f (diff)
downloadpdfium-8f524d6ff9c5c5e07388438e58aca7dc39f43a1f.tar.xz
Refactor JS method parameters and return values.
This CL removes the out parameters from the JS methods and changes the return from a |bool| to a |CJS_Return| value. The return value holds the returned v8 object, error string and a status code. Change-Id: I82488ff0d916475d7e3c8e51ed868639806181c9 Reviewed-on: https://pdfium-review.googlesource.com/16751 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/PublicMethods.h')
-rw-r--r--fpdfsdk/javascript/PublicMethods.h160
1 files changed, 65 insertions, 95 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.h b/fpdfsdk/javascript/PublicMethods.h
index 60659bad0d..11fe342e5d 100644
--- a/fpdfsdk/javascript/PublicMethods.h
+++ b/fpdfsdk/javascript/PublicMethods.h
@@ -18,101 +18,71 @@ class CJS_PublicMethods : public CJS_Object {
: CJS_Object(pObject) {}
~CJS_PublicMethods() override {}
- static bool AFNumber_Format(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFNumber_Keystroke(
- CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFPercent_Format(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFPercent_Keystroke(
- CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFDate_FormatEx(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFDate_KeystrokeEx(
- CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFDate_Format(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFDate_Keystroke(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFTime_FormatEx(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFTime_KeystrokeEx(
- CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFTime_Format(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFTime_Keystroke(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFSpecial_Format(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFSpecial_Keystroke(
- CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFSpecial_KeystrokeEx(
- CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError); //
- static bool AFSimple(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFMakeNumber(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFSimple_Calculate(
- CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFRange_Validate(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFMergeChange(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFParseDateEx(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
- static bool AFExtractNums(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params,
- CJS_Value& vRet,
- WideString& sError);
+ static CJS_Return AFNumber_Format(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFNumber_Keystroke(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFPercent_Format(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFPercent_Keystroke(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFDate_FormatEx(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFDate_KeystrokeEx(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFDate_Format(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFDate_Keystroke(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFTime_FormatEx(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFTime_KeystrokeEx(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFTime_Format(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFTime_Keystroke(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFSpecial_Format(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFSpecial_Keystroke(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFSpecial_KeystrokeEx(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFSimple(CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFMakeNumber(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFSimple_Calculate(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFRange_Validate(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFMergeChange(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFParseDateEx(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
+ static CJS_Return AFExtractNums(
+ CJS_Runtime* pRuntime,
+ const std::vector<v8::Local<v8::Value>>& params);
static void AFNumber_Format_static(
const v8::FunctionCallbackInfo<v8::Value>& info);