summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cfxjs_engine_embeddertest.cpp10
-rw-r--r--fxjs/cfxjse_engine.cpp1
-rw-r--r--fxjs/cfxjse_formcalc_context.cpp6
-rw-r--r--fxjs/xfa/cjx_tree.cpp6
4 files changed, 12 insertions, 11 deletions
diff --git a/fxjs/cfxjs_engine_embeddertest.cpp b/fxjs/cfxjs_engine_embeddertest.cpp
index ff866d3ee0..a9422ece98 100644
--- a/fxjs/cfxjs_engine_embeddertest.cpp
+++ b/fxjs/cfxjs_engine_embeddertest.cpp
@@ -51,10 +51,12 @@ TEST_F(CFXJSEngineEmbedderTest, MultipleEngines) {
engine2.InitializeEngine();
v8::Context::Scope context_scope(GetV8Context());
- Optional<IJS_Runtime::JS_Error> err = engine()->Execute(WideString(kScript0));
- EXPECT_FALSE(err);
- CheckAssignmentInEngineContext(engine(), kExpected0);
-
+ {
+ Optional<IJS_Runtime::JS_Error> err =
+ engine()->Execute(WideString(kScript0));
+ EXPECT_FALSE(err);
+ CheckAssignmentInEngineContext(engine(), kExpected0);
+ }
{
// engine1 executing in engine1's context doesn't affect main.
v8::Context::Scope context_scope1(engine1.GetV8Context());
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp
index 3b60989f32..c3b9dd3639 100644
--- a/fxjs/cfxjse_engine.cpp
+++ b/fxjs/cfxjse_engine.cpp
@@ -334,7 +334,6 @@ void CFXJSE_Engine::NormalPropertyGetter(CFXJSE_Value* pOriginalValue,
szPropName, pReturnValue, true);
if (!bRet) {
- WideString wsPropName = WideString::FromUTF8(szPropName);
const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo =
XFA_GetScriptAttributeByName(pObject->GetElementType(),
wsPropName.AsStringView());
diff --git a/fxjs/cfxjse_formcalc_context.cpp b/fxjs/cfxjse_formcalc_context.cpp
index 34f5642844..41ec5783ff 100644
--- a/fxjs/cfxjse_formcalc_context.cpp
+++ b/fxjs/cfxjse_formcalc_context.cpp
@@ -780,11 +780,11 @@ bool IsIsoTimeFormat(const char* pData,
++iIndex;
char strSec[kSubSecondLength + 1];
- for (int i = 0; i < kSubSecondLength; ++i) {
- char c = pData[iIndex + i];
+ for (int j = 0; j < kSubSecondLength; ++j) {
+ char c = pData[iIndex + j];
if (!std::isdigit(c))
return false;
- strSec[i] = c;
+ strSec[j] = c;
}
strSec[kSubSecondLength] = '\0';
diff --git a/fxjs/xfa/cjx_tree.cpp b/fxjs/xfa/cjx_tree.cpp
index 23f76583ed..5921f8bbe8 100644
--- a/fxjs/xfa/cjx_tree.cpp
+++ b/fxjs/xfa/cjx_tree.cpp
@@ -239,13 +239,13 @@ void CJX_Tree::ResolveNodeList(CFXJSE_Value* pValue,
if (resolveNodeRS.pScriptAttribute &&
resolveNodeRS.pScriptAttribute->eValueType == XFA_ScriptType::Object) {
for (auto& pObject : resolveNodeRS.objects) {
- auto pValue =
+ auto innerValue =
pdfium::MakeUnique<CFXJSE_Value>(pScriptContext->GetIsolate());
CJX_Object* jsObject = pObject->JSObject();
(jsObject->*(resolveNodeRS.pScriptAttribute->callback))(
- pValue.get(), false, resolveNodeRS.pScriptAttribute->attribute);
+ innerValue.get(), false, resolveNodeRS.pScriptAttribute->attribute);
- CXFA_Object* obj = CFXJSE_Engine::ToObject(pValue.get());
+ CXFA_Object* obj = CFXJSE_Engine::ToObject(innerValue.get());
if (obj->IsNode())
pNodeList->Append(obj->AsNode());
}