summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cfxjse_engine.cpp8
-rw-r--r--fxjs/cjs_runtime.cpp8
-rw-r--r--fxjs/cjs_runtime.h8
-rw-r--r--fxjs/cjs_runtimestub.cpp6
-rw-r--r--fxjs/ijs_runtime.h8
5 files changed, 20 insertions, 18 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp
index 198e1d5fa8..84981666df 100644
--- a/fxjs/cfxjse_engine.cpp
+++ b/fxjs/cfxjse_engine.cpp
@@ -202,8 +202,8 @@ void CFXJSE_Engine::GlobalPropertySetter(CFXJSE_Value* pObject,
if (!pNotify)
return;
- pNotify->GetDocEnvironment()->SetGlobalProperty(pNotify->GetHDOC(),
- szPropName, pValue);
+ pNotify->GetDocEnvironment()->SetPropertyInNonXFAGlobalObject(
+ pNotify->GetHDOC(), szPropName, pValue);
}
void CFXJSE_Engine::GlobalPropertyGetter(CFXJSE_Value* pObject,
@@ -259,8 +259,8 @@ void CFXJSE_Engine::GlobalPropertyGetter(CFXJSE_Value* pObject,
if (!pNotify)
return;
- pNotify->GetDocEnvironment()->GetGlobalProperty(pNotify->GetHDOC(),
- szPropName, pValue);
+ pNotify->GetDocEnvironment()->GetPropertyFromNonXFAGlobalObject(
+ pNotify->GetHDOC(), szPropName, pValue);
}
int32_t CFXJSE_Engine::GlobalPropTypeGetter(CFXJSE_Value* pOriginalValue,
diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp
index bffd77cba7..4031304b83 100644
--- a/fxjs/cjs_runtime.cpp
+++ b/fxjs/cjs_runtime.cpp
@@ -231,8 +231,8 @@ WideString ChangeObjName(const WideString& str) {
return sRet;
}
-bool CJS_Runtime::GetValueByName(const ByteStringView& utf8Name,
- CFXJSE_Value* pValue) {
+bool CJS_Runtime::GetValueByNameFromGlobalObject(const ByteStringView& utf8Name,
+ CFXJSE_Value* pValue) {
v8::Isolate::Scope isolate_scope(GetIsolate());
v8::HandleScope handle_scope(GetIsolate());
v8::Local<v8::Context> context = NewLocalContext();
@@ -248,8 +248,8 @@ bool CJS_Runtime::GetValueByName(const ByteStringView& utf8Name,
return true;
}
-bool CJS_Runtime::SetValueByName(const ByteStringView& utf8Name,
- CFXJSE_Value* pValue) {
+bool CJS_Runtime::SetValueByNameInGlobalObject(const ByteStringView& utf8Name,
+ CFXJSE_Value* pValue) {
if (utf8Name.IsEmpty() || !pValue)
return false;
diff --git a/fxjs/cjs_runtime.h b/fxjs/cjs_runtime.h
index 5d55b9a492..9d0d47fa81 100644
--- a/fxjs/cjs_runtime.h
+++ b/fxjs/cjs_runtime.h
@@ -53,10 +53,10 @@ class CJS_Runtime : public IJS_Runtime,
v8::Local<v8::Value> MaybeCoerceToNumber(v8::Local<v8::Value> value);
#ifdef PDF_ENABLE_XFA
- bool GetValueByName(const ByteStringView& utf8Name,
- CFXJSE_Value* pValue) override;
- bool SetValueByName(const ByteStringView& utf8Name,
- CFXJSE_Value* pValue) override;
+ bool GetValueByNameFromGlobalObject(const ByteStringView& utf8Name,
+ CFXJSE_Value* pValue) override;
+ bool SetValueByNameInGlobalObject(const ByteStringView& utf8Name,
+ CFXJSE_Value* pValue) override;
#endif // PDF_ENABLE_XFA
private:
diff --git a/fxjs/cjs_runtimestub.cpp b/fxjs/cjs_runtimestub.cpp
index 964b0ff9d6..105bb6f114 100644
--- a/fxjs/cjs_runtimestub.cpp
+++ b/fxjs/cjs_runtimestub.cpp
@@ -30,11 +30,13 @@ class CJS_RuntimeStub final : public IJS_Runtime {
}
#ifdef PDF_ENABLE_XFA
- bool GetValueByName(const ByteStringView&, CFXJSE_Value*) override {
+ bool GetValueByNameFromGlobalObject(const ByteStringView&,
+ CFXJSE_Value*) override {
return false;
}
- bool SetValueByName(const ByteStringView&, CFXJSE_Value*) override {
+ bool SetValueByNameInGlobalObject(const ByteStringView&,
+ CFXJSE_Value*) override {
return false;
}
#endif // PDF_ENABLE_XFA
diff --git a/fxjs/ijs_runtime.h b/fxjs/ijs_runtime.h
index 9fe5d2fed8..b97c65ef90 100644
--- a/fxjs/ijs_runtime.h
+++ b/fxjs/ijs_runtime.h
@@ -34,10 +34,10 @@ class IJS_Runtime {
virtual int ExecuteScript(const WideString& script, WideString* info) = 0;
#ifdef PDF_ENABLE_XFA
- virtual bool GetValueByName(const ByteStringView& utf8Name,
- CFXJSE_Value* pValue) = 0;
- virtual bool SetValueByName(const ByteStringView& utf8Name,
- CFXJSE_Value* pValue) = 0;
+ virtual bool GetValueByNameFromGlobalObject(const ByteStringView& utf8Name,
+ CFXJSE_Value* pValue) = 0;
+ virtual bool SetValueByNameInGlobalObject(const ByteStringView& utf8Name,
+ CFXJSE_Value* pValue) = 0;
#endif // PDF_ENABLE_XFA
protected: