summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Define.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-21 15:55:42 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-21 15:55:42 -0700
commit69ceb6a9761b3ccb228a2405e9a493a3666e0601 (patch)
treeaeda419b1fc75d5c2d2147b172edd47ae12298ac /fpdfsdk/src/javascript/JS_Define.h
parent3b2ab45f0a883046a7c457e8435b5a9b2c1c4156 (diff)
downloadpdfium-69ceb6a9761b3ccb228a2405e9a493a3666e0601.tar.xz
More master side changes for convergence with XFA.
- Add new CPDFSDK_Document::GetPDFDocument() - FPDFDocumentFromCPDFDocument() to match XFA - rename some JS variables to be consistent with XFA - remove unused param from CJS_GlobalData(). - kill dead code used XFA only. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1413883005 .
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Define.h')
-rw-r--r--fpdfsdk/src/javascript/JS_Define.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/fpdfsdk/src/javascript/JS_Define.h b/fpdfsdk/src/javascript/JS_Define.h
index b21f894ec8..867fafb3c2 100644
--- a/fpdfsdk/src/javascript/JS_Define.h
+++ b/fpdfsdk/src/javascript/JS_Define.h
@@ -147,7 +147,7 @@ void JSMethod(const char* method_name_string,
static_cast<CJS_Runtime*>(FXJS_GetRuntimeFromIsolate(isolate));
if (!pRuntime)
return;
- IJS_Context* cc = pRuntime->GetCurrentContext();
+ IJS_Context* pContext = pRuntime->GetCurrentContext();
CJS_Parameters parameters;
for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) {
parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown));
@@ -156,7 +156,7 @@ void JSMethod(const char* method_name_string,
CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder());
C* pObj = reinterpret_cast<C*>(pJSObj->GetEmbedObject());
CFX_WideString sError;
- if (!(pObj->*M)(cc, parameters, valueRes, sError)) {
+ if (!(pObj->*M)(pContext, parameters, valueRes, sError)) {
FXJS_Error(isolate, JSFormatErrorString(class_name_string,
method_name_string, sError));
return;
@@ -435,24 +435,22 @@ void JSSpecialPropDel(const char* class_name,
}
}
-template <FX_BOOL (*F)(IJS_Context* cc,
- const CJS_Parameters& params,
- CJS_Value& vRet,
- CFX_WideString& sError)>
+template <FX_BOOL (
+ *F)(IJS_Context*, const CJS_Parameters&, CJS_Value&, CFX_WideString&)>
void JSGlobalFunc(const char* func_name_string,
const v8::FunctionCallbackInfo<v8::Value>& info) {
CJS_Runtime* pRuntime =
static_cast<CJS_Runtime*>(FXJS_GetRuntimeFromIsolate(info.GetIsolate()));
if (!pRuntime)
return;
- IJS_Context* cc = pRuntime->GetCurrentContext();
+ IJS_Context* pContext = pRuntime->GetCurrentContext();
CJS_Parameters parameters;
for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) {
parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown));
}
CJS_Value valueRes(pRuntime);
CFX_WideString sError;
- if (!(*F)(cc, parameters, valueRes, sError)) {
+ if (!(*F)(pContext, parameters, valueRes, sError)) {
FXJS_Error(pRuntime->GetIsolate(),
JSFormatErrorString(func_name_string, nullptr, sError));
return;