summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Define.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-11 10:18:16 -0800
committerLei Zhang <thestig@chromium.org>2015-11-11 10:18:16 -0800
commit945fdb70f022952e9ed53847649226369352920a (patch)
tree2e6ef88fdcb63d8d8b9961e8691a2f7049a2a9f1 /fpdfsdk/src/javascript/JS_Define.h
parentdd734def34bc31be370b168267ccba9705c7fc1b (diff)
downloadpdfium-945fdb70f022952e9ed53847649226369352920a.tar.xz
Merge to XFA: Replace CJS_Parameters with std::vector<CJS_Value>.
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1437713003 . (cherry picked from commit f20a34c0f2dfca49f735a0f11147254c26831e7c) Review URL: https://codereview.chromium.org/1437863005 .
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Define.h')
-rw-r--r--fpdfsdk/src/javascript/JS_Define.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/fpdfsdk/src/javascript/JS_Define.h b/fpdfsdk/src/javascript/JS_Define.h
index b097aaa63f..0a6426868f 100644
--- a/fpdfsdk/src/javascript/JS_Define.h
+++ b/fpdfsdk/src/javascript/JS_Define.h
@@ -136,7 +136,7 @@ void JSPropSetter(const char* prop_name_string,
template <class C,
FX_BOOL (C::*M)(IJS_Context*,
- const CJS_Parameters&,
+ const std::vector<CJS_Value>&,
CJS_Value&,
CFX_WideString&)>
void JSMethod(const char* method_name_string,
@@ -148,7 +148,7 @@ void JSMethod(const char* method_name_string,
if (!pRuntime)
return;
IJS_Context* pContext = pRuntime->GetCurrentContext();
- CJS_Parameters parameters;
+ std::vector<CJS_Value> parameters;
for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) {
parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown));
}
@@ -436,8 +436,10 @@ void JSSpecialPropDel(const char* class_name,
}
}
-template <FX_BOOL (
- *F)(IJS_Context*, const CJS_Parameters&, CJS_Value&, CFX_WideString&)>
+template <FX_BOOL (*F)(IJS_Context*,
+ const std::vector<CJS_Value>&,
+ CJS_Value&,
+ CFX_WideString&)>
void JSGlobalFunc(const char* func_name_string,
const v8::FunctionCallbackInfo<v8::Value>& info) {
CJS_Runtime* pRuntime = static_cast<CJS_Runtime*>(
@@ -445,7 +447,7 @@ void JSGlobalFunc(const char* func_name_string,
if (!pRuntime)
return;
IJS_Context* pContext = pRuntime->GetCurrentContext();
- CJS_Parameters parameters;
+ std::vector<CJS_Value> parameters;
for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) {
parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown));
}