summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/cjs_runtime.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-26 11:14:08 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-26 11:14:08 -0700
commit12a6b0c1bb3ab86a03a84464bed168995ae0d82a (patch)
tree03c381e1eb6afd47f14c76cc3f9b91641a603dff /fpdfsdk/javascript/cjs_runtime.cpp
parentd3e354a43531eaed87e43d9ff2df4525186ea28d (diff)
downloadpdfium-12a6b0c1bb3ab86a03a84464bed168995ae0d82a.tar.xz
Remove FXJSE_HOBJECT and FXJSE_HVALUE for CFXJSE_Value*
This CL replaces FXJSE_HOBJECT and FXJSE_HVALUE with the concrete CFXJSE_Value* type. All variables are renamed to match. Review-Url: https://codereview.chromium.org/2012253002
Diffstat (limited to 'fpdfsdk/javascript/cjs_runtime.cpp')
-rw-r--r--fpdfsdk/javascript/cjs_runtime.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/fpdfsdk/javascript/cjs_runtime.cpp b/fpdfsdk/javascript/cjs_runtime.cpp
index 8fd7cf1a0e..bcdc17c386 100644
--- a/fpdfsdk/javascript/cjs_runtime.cpp
+++ b/fpdfsdk/javascript/cjs_runtime.cpp
@@ -260,8 +260,8 @@ CFX_WideString ChangeObjName(const CFX_WideString& str) {
sRet.Replace(L"_", L".");
return sRet;
}
-FX_BOOL CJS_Runtime::GetHValueByName(const CFX_ByteStringC& utf8Name,
- FXJSE_HVALUE hValue) {
+FX_BOOL CJS_Runtime::GetValueByName(const CFX_ByteStringC& utf8Name,
+ CFXJSE_Value* pValue) {
#ifdef PDF_ENABLE_XFA
const FX_CHAR* name = utf8Name.c_str();
@@ -287,18 +287,18 @@ FX_BOOL CJS_Runtime::GetHValueByName(const CFX_ByteStringC& utf8Name,
GetIsolate(), name, v8::String::kNormalString, utf8Name.GetLength()));
if (propvalue.IsEmpty()) {
- FXJSE_Value_SetUndefined(hValue);
+ FXJSE_Value_SetUndefined(pValue);
return FALSE;
}
- ((CFXJSE_Value*)hValue)->ForceSetValue(propvalue);
+ pValue->ForceSetValue(propvalue);
#endif
return TRUE;
}
-FX_BOOL CJS_Runtime::SetHValueByName(const CFX_ByteStringC& utf8Name,
- FXJSE_HVALUE hValue) {
+FX_BOOL CJS_Runtime::SetValueByName(const CFX_ByteStringC& utf8Name,
+ CFXJSE_Value* pValue) {
#ifdef PDF_ENABLE_XFA
- if (utf8Name.IsEmpty() || hValue == NULL)
+ if (utf8Name.IsEmpty() || !pValue)
return FALSE;
const FX_CHAR* name = utf8Name.c_str();
v8::Isolate* pIsolate = GetIsolate();
@@ -311,8 +311,8 @@ FX_BOOL CJS_Runtime::SetHValueByName(const CFX_ByteStringC& utf8Name,
// v8::Local<v8::Context> tmpCotext =
// v8::Local<v8::Context>::New(GetIsolate(), m_context);
- v8::Local<v8::Value> propvalue = v8::Local<v8::Value>::New(
- GetIsolate(), ((CFXJSE_Value*)hValue)->DirectGetValue());
+ v8::Local<v8::Value> propvalue =
+ v8::Local<v8::Value>::New(GetIsolate(), pValue->DirectGetValue());
context->Global()->Set(
v8::String::NewFromUtf8(pIsolate, name, v8::String::kNormalString,
utf8Name.GetLength()),