summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Define.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-11 10:11:18 -0800
committerLei Zhang <thestig@chromium.org>2015-11-11 10:11:18 -0800
commitf20a34c0f2dfca49f735a0f11147254c26831e7c (patch)
treedb3ee108eab6cd56a96990a74a9ba3d4bb82b112 /fpdfsdk/src/javascript/JS_Define.h
parent56e3da27d8bed8a6c03274b7b946e3f6d6ac11f4 (diff)
downloadpdfium-f20a34c0f2dfca49f735a0f11147254c26831e7c.tar.xz
Replace CJS_Parameters with std::vector<CJS_Value>.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1437713003 .
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 3ebd07518e..605439136e 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));
}
@@ -435,8 +435,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 =
@@ -444,7 +446,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));
}