summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript')
-rw-r--r--fpdfsdk/javascript/JS_Runtime_Stub.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_runtime.cpp18
-rw-r--r--fpdfsdk/javascript/cjs_runtime.h8
-rw-r--r--fpdfsdk/javascript/ijs_runtime.h8
4 files changed, 19 insertions, 19 deletions
diff --git a/fpdfsdk/javascript/JS_Runtime_Stub.cpp b/fpdfsdk/javascript/JS_Runtime_Stub.cpp
index 7d201d1b56..e94f8c7780 100644
--- a/fpdfsdk/javascript/JS_Runtime_Stub.cpp
+++ b/fpdfsdk/javascript/JS_Runtime_Stub.cpp
@@ -139,11 +139,11 @@ class CJS_RuntimeStub final : public IJS_Runtime {
CPDFSDK_Document* GetReaderDocument() override { return m_pDoc; }
#ifdef PDF_ENABLE_XFA
- FX_BOOL GetHValueByName(const CFX_ByteStringC&, FXJSE_HVALUE) override {
+ FX_BOOL GetValueByName(const CFX_ByteStringC&, CFXJSE_Value*) override {
return FALSE;
}
- FX_BOOL SetHValueByName(const CFX_ByteStringC&, FXJSE_HVALUE) override {
+ FX_BOOL SetValueByName(const CFX_ByteStringC&, CFXJSE_Value*) override {
return FALSE;
}
#endif // PDF_ENABLE_XFA
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()),
diff --git a/fpdfsdk/javascript/cjs_runtime.h b/fpdfsdk/javascript/cjs_runtime.h
index e2091fdcfd..cc0f6545ac 100644
--- a/fpdfsdk/javascript/cjs_runtime.h
+++ b/fpdfsdk/javascript/cjs_runtime.h
@@ -64,10 +64,10 @@ class CJS_Runtime : public IJS_Runtime {
v8::Local<v8::Array> GetConstArray(const CFX_WideString& name);
#ifdef PDF_ENABLE_XFA
- FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name,
- FXJSE_HVALUE hValue) override;
- FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name,
- FXJSE_HVALUE hValue) override;
+ FX_BOOL GetValueByName(const CFX_ByteStringC& utf8Name,
+ CFXJSE_Value* pValue) override;
+ FX_BOOL SetValueByName(const CFX_ByteStringC& utf8Name,
+ CFXJSE_Value* pValue) override;
#endif // PDF_ENABLE_XFA
void AddObserver(Observer* observer);
diff --git a/fpdfsdk/javascript/ijs_runtime.h b/fpdfsdk/javascript/ijs_runtime.h
index d4e9000cfd..ef80feb820 100644
--- a/fpdfsdk/javascript/ijs_runtime.h
+++ b/fpdfsdk/javascript/ijs_runtime.h
@@ -35,10 +35,10 @@ class IJS_Runtime {
CFX_WideString* info) = 0;
#ifdef PDF_ENABLE_XFA
- virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name,
- FXJSE_HVALUE hValue) = 0;
- virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name,
- FXJSE_HVALUE hValue) = 0;
+ virtual FX_BOOL GetValueByName(const CFX_ByteStringC& utf8Name,
+ CFXJSE_Value* pValue) = 0;
+ virtual FX_BOOL SetValueByName(const CFX_ByteStringC& utf8Name,
+ CFXJSE_Value* pValue) = 0;
#endif // PDF_ENABLE_XFA
protected: