summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/app/xfa_ffdochandler.cpp3
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp296
-rw-r--r--xfa/fxfa/parser/xfa_script.h2
-rw-r--r--xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp4
-rw-r--r--xfa/fxfa/parser/xfa_script_imp.cpp23
-rw-r--r--xfa/fxjse/cfxjse_arguments.h2
-rw-r--r--xfa/fxjse/class.cpp5
-rw-r--r--xfa/fxjse/include/fxjse.h2
-rw-r--r--xfa/fxjse/util_inline.h11
-rw-r--r--xfa/fxjse/value.cpp9
-rw-r--r--xfa/fxjse/value.h2
11 files changed, 138 insertions, 221 deletions
diff --git a/xfa/fxfa/app/xfa_ffdochandler.cpp b/xfa/fxfa/app/xfa_ffdochandler.cpp
index 389e5ac6da..4a78f4fab1 100644
--- a/xfa/fxfa/app/xfa_ffdochandler.cpp
+++ b/xfa/fxfa/app/xfa_ffdochandler.cpp
@@ -56,6 +56,5 @@ FX_BOOL CXFA_FFDocHandler::RunDocScript(CXFA_FFDoc* hDoc,
return pScriptContext->RunScript(
(XFA_SCRIPTLANGTYPE)eScriptType, wsScript, hRetValue,
- hThisObject ? (CXFA_Object*)FXJSE_Value_ToObject(hThisObject, nullptr)
- : nullptr);
+ hThisObject ? (CXFA_Object*)FXJSE_Value_ToObject(hThisObject) : nullptr);
}
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 7f0514eca0..2399bacbda 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -315,7 +315,7 @@ void CXFA_FM2JSContext::Abs(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argOne);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Abs");
}
@@ -323,8 +323,7 @@ void CXFA_FM2JSContext::Abs(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Avg(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t argc = args.GetLength();
uint32_t uCount = 0;
@@ -391,8 +390,7 @@ void CXFA_FM2JSContext::Avg(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Ceil(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 1) {
FXJSE_HVALUE argValue = GetSimpleHValue(hThis, args, 0);
if (HValueIsNull(hThis, argValue)) {
@@ -410,8 +408,7 @@ void CXFA_FM2JSContext::Ceil(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t argc = args.GetLength();
uint32_t uCount = 0;
@@ -474,8 +471,7 @@ void CXFA_FM2JSContext::Count(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Floor(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 1) {
FXJSE_HVALUE argValue = GetSimpleHValue(hThis, args, 0);
if (HValueIsNull(hThis, argValue)) {
@@ -493,8 +489,7 @@ void CXFA_FM2JSContext::Floor(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Max(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t argc = args.GetLength();
uint32_t uCount = 0;
@@ -596,8 +591,7 @@ void CXFA_FM2JSContext::Max(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Min(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t argc = args.GetLength();
uint32_t uCount = 0;
@@ -699,8 +693,7 @@ void CXFA_FM2JSContext::Min(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Mod(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
if (args.GetLength() == 2) {
FXJSE_HVALUE argOne = args.GetValue(0);
@@ -786,8 +779,7 @@ void CXFA_FM2JSContext::Mod(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t argc = args.GetLength();
uint8_t uPrecision = 0;
@@ -896,8 +888,7 @@ void CXFA_FM2JSContext::Round(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Sum(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t argc = args.GetLength();
uint32_t uCount = 0;
@@ -988,7 +979,7 @@ void CXFA_FM2JSContext::Date(FXJSE_HOBJECT hThis,
FXJSE_Value_SetInteger(args.GetReturnValue(), dDays);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Date");
}
@@ -1049,7 +1040,7 @@ void CXFA_FM2JSContext::Date2Num(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Date2Num");
}
@@ -1100,7 +1091,7 @@ void CXFA_FM2JSContext::DateFmt(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Date2Num");
}
@@ -1121,7 +1112,7 @@ void CXFA_FM2JSContext::IsoDate2Num(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argOne);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"IsoDate2Num");
}
@@ -1129,8 +1120,7 @@ void CXFA_FM2JSContext::IsoDate2Num(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::IsoTime2Num(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if (HValueIsNull(hThis, argOne)) {
@@ -1229,7 +1219,7 @@ void CXFA_FM2JSContext::LocalDateFmt(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"LocalDateFmt");
}
@@ -1280,7 +1270,7 @@ void CXFA_FM2JSContext::LocalTimeFmt(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"LocalTimeFmt");
}
@@ -1435,7 +1425,7 @@ void CXFA_FM2JSContext::Num2Date(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Num2Date");
}
@@ -1497,7 +1487,7 @@ void CXFA_FM2JSContext::Num2GMTime(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Num2GMTime");
}
@@ -1559,7 +1549,7 @@ void CXFA_FM2JSContext::Num2Time(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Num2Time");
}
@@ -1578,7 +1568,7 @@ void CXFA_FM2JSContext::Time(FXJSE_HOBJECT hThis,
((iGMHour * 3600 + iGMMin * 60 + iGMSec) * 1000));
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Time");
}
@@ -1618,7 +1608,7 @@ void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis,
}
if (!bFlags) {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
CXFA_Document* pDoc = pContext->GetDocument();
IFX_LocaleMgr* pMgr = (IFX_LocaleMgr*)pDoc->GetLocalMgr();
IFX_Locale* pLocale = NULL;
@@ -1682,7 +1672,7 @@ void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Time2Num");
}
@@ -1733,7 +1723,7 @@ void CXFA_FM2JSContext::TimeFmt(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"TimeFmt");
}
@@ -2062,8 +2052,7 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoDate(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFormat,
const CFX_ByteStringC& szLocale,
CFX_ByteString& strIsoDate) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
CXFA_Document* pDoc = pContext->GetDocument();
if (!pDoc) {
return FALSE;
@@ -2098,8 +2087,7 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoTime(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFormat,
const CFX_ByteStringC& szLocale,
CFX_ByteString& strIsoTime) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
CXFA_Document* pDoc = pContext->GetDocument();
if (!pDoc) {
return FALSE;
@@ -2137,8 +2125,7 @@ FX_BOOL CXFA_FM2JSContext::IsoDate2Local(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFormat,
const CFX_ByteStringC& szLocale,
CFX_ByteString& strLocalDate) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
CXFA_Document* pDoc = pContext->GetDocument();
if (!pDoc) {
return FALSE;
@@ -2175,8 +2162,7 @@ FX_BOOL CXFA_FM2JSContext::IsoTime2Local(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFormat,
const CFX_ByteStringC& szLocale,
CFX_ByteString& strLocalTime) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
CXFA_Document* pDoc = pContext->GetDocument();
if (!pDoc) {
return FALSE;
@@ -2215,8 +2201,7 @@ FX_BOOL CXFA_FM2JSContext::GetGMTTime(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFormat,
const CFX_ByteStringC& szLocale,
CFX_ByteString& strGMTTime) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
CXFA_Document* pDoc = pContext->GetDocument();
if (!pDoc) {
return FALSE;
@@ -2349,8 +2334,7 @@ void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis,
strStyle = FX_LOCALEDATETIMESUBCATEGORY_Medium;
break;
}
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
CXFA_Document* pDoc = pContext->GetDocument();
if (!pDoc) {
return;
@@ -2403,8 +2387,7 @@ void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis,
strStyle = FX_LOCALEDATETIMESUBCATEGORY_Medium;
break;
}
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
CXFA_Document* pDoc = pContext->GetDocument();
if (!pDoc) {
return;
@@ -2499,8 +2482,7 @@ void CXFA_FM2JSContext::GetLocalTimeZone(int32_t& iHour,
void CXFA_FM2JSContext::Apr(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 3) {
FX_BOOL bFlags = FALSE;
FX_DOUBLE nPrincipal = 0;
@@ -2565,8 +2547,7 @@ void CXFA_FM2JSContext::Apr(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::CTerm(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 3) {
FX_BOOL bFlags = FALSE;
FX_FLOAT nRate = 0;
@@ -2603,8 +2584,7 @@ void CXFA_FM2JSContext::CTerm(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::FV(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 3) {
FX_BOOL bFlags = FALSE;
FX_DOUBLE nAmount = 0;
@@ -2649,8 +2629,7 @@ void CXFA_FM2JSContext::FV(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::IPmt(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 5) {
FX_BOOL bFlags = FALSE;
FX_FLOAT nPrincpalAmount = 0;
@@ -2722,8 +2701,7 @@ void CXFA_FM2JSContext::IPmt(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::NPV(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
int32_t argc = args.GetLength();
if (argc > 2) {
FX_BOOL bFlags = FALSE;
@@ -2773,8 +2751,7 @@ void CXFA_FM2JSContext::NPV(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Pmt(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 3) {
FX_BOOL bFlags = FALSE;
FX_FLOAT nPrincipal = 0;
@@ -2816,8 +2793,7 @@ void CXFA_FM2JSContext::Pmt(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::PPmt(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 5) {
FX_BOOL bFlags = FALSE;
FX_FLOAT nPrincpalAmount = 0;
@@ -2890,8 +2866,7 @@ void CXFA_FM2JSContext::PPmt(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::PV(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 3) {
FX_BOOL bFlags = FALSE;
FX_DOUBLE nAmount = 0;
@@ -2932,8 +2907,7 @@ void CXFA_FM2JSContext::PV(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Rate(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 3) {
FX_BOOL bFlags = FALSE;
FX_FLOAT nFuture = 0;
@@ -2971,8 +2945,7 @@ void CXFA_FM2JSContext::Rate(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Term(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 3) {
FX_BOOL bFlags = FALSE;
FX_FLOAT nMount = 0;
@@ -3010,8 +2983,7 @@ void CXFA_FM2JSContext::Term(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Choose(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t argc = args.GetLength();
if (argc > 1) {
@@ -3087,7 +3059,7 @@ void CXFA_FM2JSContext::Choose(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Choose");
}
@@ -3101,7 +3073,7 @@ void CXFA_FM2JSContext::Exists(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argOne);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Exists");
}
@@ -3124,7 +3096,7 @@ void CXFA_FM2JSContext::HasValue(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argOne);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"HasValue");
}
@@ -3154,7 +3126,7 @@ void CXFA_FM2JSContext::Oneof(FXJSE_HOBJECT hThis,
parametersValue = 0;
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Oneof");
}
@@ -3195,7 +3167,7 @@ void CXFA_FM2JSContext::Within(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argOne);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Within");
}
@@ -3215,7 +3187,7 @@ void CXFA_FM2JSContext::If(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argCondition);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"If");
}
@@ -3223,8 +3195,7 @@ void CXFA_FM2JSContext::If(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Eval(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
if (args.GetLength() == 1) {
FXJSE_HVALUE scriptValue = GetSimpleHValue(hThis, args, 0);
@@ -3259,8 +3230,7 @@ void CXFA_FM2JSContext::Eval(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Ref(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
if (args.GetLength() == 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
@@ -3444,7 +3414,7 @@ void CXFA_FM2JSContext::UnitType(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(unitspanValue);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"UnitType");
}
@@ -3603,7 +3573,7 @@ void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"UnitValue");
}
@@ -3611,8 +3581,7 @@ void CXFA_FM2JSContext::UnitValue(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::At(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 2) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE argTwo = GetSimpleHValue(hThis, args, 1);
@@ -3640,8 +3609,7 @@ void CXFA_FM2JSContext::At(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Concat(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
int32_t argc = args.GetLength();
if (argc >= 1) {
CFX_ByteString resultString;
@@ -3674,8 +3642,7 @@ void CXFA_FM2JSContext::Concat(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Decode(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
int32_t argc = args.GetLength();
if (argc == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
@@ -3945,8 +3912,7 @@ void CXFA_FM2JSContext::DecodeXML(const CFX_ByteStringC& szXMLString,
void CXFA_FM2JSContext::Encode(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
int32_t argc = args.GetLength();
if (argc == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
@@ -4356,8 +4322,7 @@ static FX_BOOL XFA_PATTERN_STRING_Type(const CFX_ByteStringC& szPattern,
void CXFA_FM2JSContext::Format(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
int32_t argc = args.GetLength();
if (argc >= 2) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
@@ -4444,8 +4409,7 @@ void CXFA_FM2JSContext::Format(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Left(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 2) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE argTwo = GetSimpleHValue(hThis, args, 1);
@@ -4475,8 +4439,7 @@ void CXFA_FM2JSContext::Left(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Len(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if (HValueIsNull(hThis, argOne)) {
@@ -4538,7 +4501,7 @@ void CXFA_FM2JSContext::Lower(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argOne);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Lower");
}
@@ -4546,8 +4509,7 @@ void CXFA_FM2JSContext::Lower(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Ltrim(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if (HValueIsNull(hThis, argOne)) {
@@ -4568,8 +4530,7 @@ void CXFA_FM2JSContext::Ltrim(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Parse(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 2) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE argTwo = GetSimpleHValue(hThis, args, 1);
@@ -4768,7 +4729,7 @@ void CXFA_FM2JSContext::Replace(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Replace");
}
@@ -4776,8 +4737,7 @@ void CXFA_FM2JSContext::Replace(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Right(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 2) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE argTwo = GetSimpleHValue(hThis, args, 1);
@@ -4807,8 +4767,7 @@ void CXFA_FM2JSContext::Right(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Rtrim(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if (HValueIsNull(hThis, argOne)) {
@@ -4829,8 +4788,7 @@ void CXFA_FM2JSContext::Rtrim(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Space(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
if (FXJSE_Value_IsNull(argOne)) {
@@ -4975,7 +4933,7 @@ void CXFA_FM2JSContext::Str(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Str");
}
@@ -5037,7 +4995,7 @@ void CXFA_FM2JSContext::Stuff(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Stuff");
}
@@ -5083,7 +5041,7 @@ void CXFA_FM2JSContext::Substr(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(endValue);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Substr");
}
@@ -5109,7 +5067,7 @@ void CXFA_FM2JSContext::Uuid(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Uuid");
}
@@ -5160,7 +5118,7 @@ void CXFA_FM2JSContext::Upper(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argOne);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"Upper");
}
@@ -5220,7 +5178,7 @@ void CXFA_FM2JSContext::WordNum(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
L"WordNum");
}
@@ -5423,8 +5381,7 @@ void CXFA_FM2JSContext::WordUS(const CFX_ByteStringC& szData,
void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
int32_t argc = args.GetLength();
if (argc == 1) {
CXFA_Document* pDoc = pContext->GetDocument();
@@ -5459,8 +5416,7 @@ void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Post(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
int32_t argc = args.GetLength();
if ((argc >= 2) && (argc <= 5)) {
CXFA_Document* pDoc = pContext->GetDocument();
@@ -5530,8 +5486,7 @@ void CXFA_FM2JSContext::Post(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::Put(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
int32_t argc = args.GetLength();
if ((argc == 2) || (argc == 3)) {
CXFA_Document* pDoc = pContext->GetDocument();
@@ -5577,8 +5532,7 @@ void CXFA_FM2JSContext::Put(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::assign_value_operator(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
if (args.GetLength() == 2) {
FXJSE_HVALUE lValue = args.GetValue(0);
@@ -5642,7 +5596,7 @@ void CXFA_FM2JSContext::logical_or_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argSecond);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5663,7 +5617,7 @@ void CXFA_FM2JSContext::logical_and_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argSecond);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5701,7 +5655,7 @@ void CXFA_FM2JSContext::equality_operator(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5738,15 +5692,14 @@ void CXFA_FM2JSContext::notequality_operator(FXJSE_HOBJECT hThis,
}
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
FX_BOOL CXFA_FM2JSContext::fm_ref_equal(FXJSE_HOBJECT hThis,
CFXJSE_Arguments& args) {
FX_BOOL bRet = FALSE;
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
FXJSE_HVALUE argFirst = args.GetValue(0);
FXJSE_HVALUE argSecond = args.GetValue(0);
@@ -5763,8 +5716,8 @@ FX_BOOL CXFA_FM2JSContext::fm_ref_equal(FXJSE_HOBJECT hThis,
FXJSE_Value_GetObjectPropByIdx(argSecond, 2, secondJSObject);
if (!FXJSE_Value_IsNull(firstJSObject) &&
!FXJSE_Value_IsNull(secondJSObject)) {
- bRet = (FXJSE_Value_ToObject(firstJSObject, NULL) ==
- FXJSE_Value_ToObject(secondJSObject, NULL));
+ bRet = (FXJSE_Value_ToObject(firstJSObject) ==
+ FXJSE_Value_ToObject(secondJSObject));
}
FXJSE_Value_Release(firstJSObject);
FXJSE_Value_Release(secondJSObject);
@@ -5802,7 +5755,7 @@ void CXFA_FM2JSContext::less_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argSecond);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5835,7 +5788,7 @@ void CXFA_FM2JSContext::lessequal_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argSecond);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5865,7 +5818,7 @@ void CXFA_FM2JSContext::greater_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argSecond);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5898,7 +5851,7 @@ void CXFA_FM2JSContext::greaterequal_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argSecond);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5919,7 +5872,7 @@ void CXFA_FM2JSContext::plus_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argSecond);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5940,7 +5893,7 @@ void CXFA_FM2JSContext::minus_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argSecond);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5961,15 +5914,14 @@ void CXFA_FM2JSContext::multiple_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argSecond);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
void CXFA_FM2JSContext::divide_operator(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
if (args.GetLength() == 2) {
FXJSE_HVALUE argFirst = GetSimpleHValue(hThis, args, 0);
FXJSE_HVALUE argSecond = GetSimpleHValue(hThis, args, 1);
@@ -6005,7 +5957,7 @@ void CXFA_FM2JSContext::positive_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argOne);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -6024,7 +5976,7 @@ void CXFA_FM2JSContext::negative_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argOne);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
@@ -6043,15 +5995,14 @@ void CXFA_FM2JSContext::logical_not_operator(FXJSE_HOBJECT hThis,
FXJSE_Value_Release(argOne);
} else {
CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
}
}
void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t argc = args.GetLength();
if ((argc == 4) || (argc == 5)) {
@@ -6202,8 +6153,7 @@ void CXFA_FM2JSContext::dot_accessor(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t argc = args.GetLength();
if ((argc == 4) || (argc == 5)) {
@@ -6349,8 +6299,7 @@ void CXFA_FM2JSContext::dotdot_accessor(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::eval_translation(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
int32_t argc = args.GetLength();
if (argc == 1) {
FXJSE_HVALUE argOne = GetSimpleHValue(hThis, args, 0);
@@ -6408,8 +6357,7 @@ void CXFA_FM2JSContext::is_fm_array(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::get_fm_value(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t iLength = args.GetLength();
if (iLength == 1) {
@@ -6443,7 +6391,7 @@ void CXFA_FM2JSContext::get_fm_jsobj(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
CXFA_FM2JSContext* pContext =
- static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(hThis, nullptr));
+ static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(hThis));
int32_t argc = args.GetLength();
if (argc == 1) {
FXJSE_HVALUE argOne = args.GetValue(0);
@@ -6467,8 +6415,7 @@ void CXFA_FM2JSContext::get_fm_jsobj(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::fm_var_filter(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t argc = args.GetLength();
if (argc == 1) {
@@ -6523,8 +6470,7 @@ void CXFA_FM2JSContext::fm_var_filter(FXJSE_HOBJECT hThis,
void CXFA_FM2JSContext::concat_fm_object(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
uint32_t iLength = 0;
int32_t argCount = args.GetLength();
@@ -6572,8 +6518,7 @@ void CXFA_FM2JSContext::concat_fm_object(FXJSE_HOBJECT hThis,
FXJSE_HVALUE CXFA_FM2JSContext::GetSimpleHValue(FXJSE_HOBJECT hThis,
CFXJSE_Arguments& args,
uint32_t index) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
ASSERT(index < (uint32_t)args.GetLength());
FXJSE_HVALUE argIndex = args.GetValue(index);
@@ -6613,8 +6558,7 @@ FXJSE_HVALUE CXFA_FM2JSContext::GetSimpleHValue(FXJSE_HOBJECT hThis,
}
}
FX_BOOL CXFA_FM2JSContext::HValueIsNull(FXJSE_HOBJECT hThis, FXJSE_HVALUE arg) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
FX_BOOL isNull = FALSE;
if (FXJSE_Value_IsNull(arg)) {
@@ -6661,8 +6605,7 @@ FX_BOOL CXFA_FM2JSContext::HValueIsNull(FXJSE_HOBJECT hThis, FXJSE_HVALUE arg) {
}
int32_t CXFA_FM2JSContext::hvalue_get_array_length(FXJSE_HOBJECT hThis,
FXJSE_HVALUE arg) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t iLength = 0;
if (FXJSE_Value_IsArray(arg)) {
@@ -6700,8 +6643,7 @@ void CXFA_FM2JSContext::unfoldArgs(FXJSE_HOBJECT hThis,
FXJSE_HVALUE*& resultValues,
int32_t& iCount,
int32_t iStart) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
iCount = 0;
int32_t argc = args.GetLength();
@@ -6767,8 +6709,7 @@ void CXFA_FM2JSContext::unfoldArgs(FXJSE_HOBJECT hThis,
}
void CXFA_FM2JSContext::GetObjectDefaultValue(FXJSE_HVALUE hObjectValue,
FXJSE_HVALUE hDefaultValue) {
- CXFA_Node* pNode =
- ToNode((CXFA_Object*)FXJSE_Value_ToObject(hObjectValue, NULL));
+ CXFA_Node* pNode = ToNode((CXFA_Object*)FXJSE_Value_ToObject(hObjectValue));
if (pNode) {
pNode->Script_Som_DefaultValue(hDefaultValue, FALSE, (XFA_ATTRIBUTE)-1);
} else {
@@ -6777,8 +6718,7 @@ void CXFA_FM2JSContext::GetObjectDefaultValue(FXJSE_HVALUE hObjectValue,
}
FX_BOOL CXFA_FM2JSContext::SetObjectDefaultValue(FXJSE_HVALUE hObjectValue,
FXJSE_HVALUE hNewValue) {
- CXFA_Node* pNode =
- ToNode((CXFA_Object*)FXJSE_Value_ToObject(hObjectValue, NULL));
+ CXFA_Node* pNode = ToNode((CXFA_Object*)FXJSE_Value_ToObject(hObjectValue));
if (pNode) {
pNode->Script_Som_DefaultValue(hNewValue, TRUE, (XFA_ATTRIBUTE)-1);
return TRUE;
@@ -6819,8 +6759,7 @@ FX_BOOL CXFA_FM2JSContext::GetObjectByName(
FXJSE_HVALUE accessorValue,
const CFX_ByteStringC& szAccessorName) {
FX_BOOL bFlags = FALSE;
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
CXFA_Document* pDoc = pContext->GetDocument();
if (!pDoc) {
return bFlags;
@@ -6848,8 +6787,7 @@ int32_t CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis,
FX_BOOL bHasNoResolveName) {
CFX_WideString wsSomExpression = CFX_WideString::FromUTF8(bsSomExp);
int32_t iRet = -1;
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
CXFA_Document* pDoc = pContext->GetDocument();
if (!pDoc) {
return iRet;
@@ -6862,7 +6800,7 @@ int32_t CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis,
pNode = pScriptContext->GetThisObject();
dFlags = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent;
} else {
- pNode = (CXFA_Object*)FXJSE_Value_ToObject(hRefValue, NULL);
+ pNode = (CXFA_Object*)FXJSE_Value_ToObject(hRefValue);
ASSERT(pNode);
if (bHasNoResolveName) {
CFX_WideString wsName;
@@ -6884,7 +6822,7 @@ int32_t CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis,
}
}
} else {
- pNode = (CXFA_Object*)FXJSE_Value_ToObject(hRefValue, NULL);
+ pNode = (CXFA_Object*)FXJSE_Value_ToObject(hRefValue);
dFlags = XFA_RESOLVENODE_AnyChild;
}
iRet = pScriptContext->ResolveObjects(pNode, wsSomExpression.AsStringC(),
@@ -6898,8 +6836,7 @@ void CXFA_FM2JSContext::ParseResolveResult(
FXJSE_HVALUE*& resultValues,
int32_t& iSize,
FX_BOOL& bAttribute) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
iSize = 0;
resultValues = NULL;
@@ -6937,8 +6874,7 @@ void CXFA_FM2JSContext::ParseResolveResult(
}
int32_t CXFA_FM2JSContext::HValueToInteger(FXJSE_HOBJECT hThis,
FXJSE_HVALUE hValue) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
int32_t iValue = 0;
if (FXJSE_Value_IsArray(hValue)) {
@@ -6981,8 +6917,7 @@ FX_DOUBLE CXFA_FM2JSContext::StringToDouble(
}
FX_FLOAT CXFA_FM2JSContext::HValueToFloat(FXJSE_HOBJECT hThis,
FXJSE_HVALUE arg) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
FX_FLOAT fRet = 0.0f;
if (FXJSE_Value_IsArray(arg)) {
@@ -7021,8 +6956,7 @@ FX_FLOAT CXFA_FM2JSContext::HValueToFloat(FXJSE_HOBJECT hThis,
}
FX_DOUBLE CXFA_FM2JSContext::HValueToDouble(FXJSE_HOBJECT hThis,
FXJSE_HVALUE arg) {
- CXFA_FM2JSContext* pContext =
- (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_FM2JSContext* pContext = (CXFA_FM2JSContext*)FXJSE_Value_ToObject(hThis);
v8::Isolate* pIsolate = pContext->GetScriptRuntime();
FX_DOUBLE dRet = 0;
if (FXJSE_Value_IsArray(arg)) {
diff --git a/xfa/fxfa/parser/xfa_script.h b/xfa/fxfa/parser/xfa_script.h
index 04cc5b9a69..d6085411b3 100644
--- a/xfa/fxfa/parser/xfa_script.h
+++ b/xfa/fxfa/parser/xfa_script.h
@@ -45,7 +45,7 @@ class CXFA_HVALUEArray : public CFX_ArrayTemplate<FXJSE_HVALUE> {
}
void GetAttributeObject(CXFA_ObjArray& objArray) {
for (int32_t i = 0; i < GetSize(); i++) {
- CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(GetAt(i), NULL);
+ CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(GetAt(i));
objArray.Add(pObject);
}
}
diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
index 94fa8db96c..a3b686bb56 100644
--- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
@@ -310,7 +310,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(
if (iLength >= 1) {
FXJSE_HVALUE hValue = pArguments->GetValue(0);
if (FXJSE_Value_IsObject(hValue)) {
- pNode = static_cast<CXFA_Node*>(FXJSE_Value_ToObject(hValue, nullptr));
+ pNode = static_cast<CXFA_Node*>(FXJSE_Value_ToObject(hValue));
} else if (FXJSE_Value_IsUTF8String(hValue)) {
CFX_ByteString bsString;
FXJSE_Value_ToUTF8String(hValue, bsString);
@@ -511,7 +511,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(
if (iLength >= 1) {
FXJSE_HVALUE hValue = pArguments->GetValue(0);
if (FXJSE_Value_IsObject(hValue)) {
- pNode = static_cast<CXFA_Node*>(FXJSE_Value_ToObject(hValue, NULL));
+ pNode = static_cast<CXFA_Node*>(FXJSE_Value_ToObject(hValue));
} else if (FXJSE_Value_IsUTF8String(hValue)) {
CFX_ByteString bsString;
FXJSE_Value_ToUTF8String(hValue, bsString);
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index 50810305e4..fe3a3e0a94 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -101,8 +101,7 @@ FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject,
const CFX_ByteStringC& szPropName,
FXJSE_HVALUE hValue) {
- CXFA_Object* lpOrginalNode =
- (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
+ CXFA_Object* lpOrginalNode = (CXFA_Object*)FXJSE_Value_ToObject(hObject);
CXFA_Document* pDoc = lpOrginalNode->GetDocument();
CXFA_ScriptContext* lpScriptContext =
(CXFA_ScriptContext*)pDoc->GetScriptContext();
@@ -159,8 +158,7 @@ FX_BOOL CXFA_ScriptContext::QueryNodeByFlag(CXFA_Node* refNode,
void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject,
const CFX_ByteStringC& szPropName,
FXJSE_HVALUE hValue) {
- CXFA_Object* pOrginalObject =
- (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
+ CXFA_Object* pOrginalObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject);
CXFA_Document* pDoc = pOrginalObject->GetDocument();
CXFA_ScriptContext* lpScriptContext =
(CXFA_ScriptContext*)pDoc->GetScriptContext();
@@ -214,8 +212,7 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject,
void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject,
const CFX_ByteStringC& szPropName,
FXJSE_HVALUE hValue) {
- CXFA_Object* pOrginalObject =
- (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
+ CXFA_Object* pOrginalObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject);
if (pOrginalObject == NULL) {
FXJSE_Value_SetUndefined(hValue);
return;
@@ -260,8 +257,7 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject,
void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject,
const CFX_ByteStringC& szPropName,
FXJSE_HVALUE hValue) {
- CXFA_Object* pOrginalObject =
- (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
+ CXFA_Object* pOrginalObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject);
if (pOrginalObject == NULL) {
return;
}
@@ -312,7 +308,7 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter(
FXJSE_HOBJECT hObject,
const CFX_ByteStringC& szPropName,
FX_BOOL bQueryIn) {
- CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
+ CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject);
if (pObject == NULL) {
return FXJSE_ClassPropType_None;
}
@@ -334,7 +330,7 @@ int32_t CXFA_ScriptContext::GlobalPropTypeGetter(
FXJSE_HOBJECT hObject,
const CFX_ByteStringC& szPropName,
FX_BOOL bQueryIn) {
- CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
+ CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject);
if (pObject == NULL) {
return FXJSE_ClassPropType_None;
}
@@ -351,7 +347,7 @@ int32_t CXFA_ScriptContext::GlobalPropTypeGetter(
void CXFA_ScriptContext::NormalMethodCall(FXJSE_HOBJECT hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hThis, NULL);
+ CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hThis);
if (pObject == NULL) {
return;
}
@@ -513,7 +509,7 @@ void CXFA_ScriptContext::ReleaseVariablesMap() {
FXJSE_HCONTEXT hVariableContext = nullptr;
m_mapVariableToHValue.GetNextAssoc(ps, pScriptNode, hVariableContext);
FXJSE_HVALUE hObject = FXJSE_Context_GetGlobalObject(hVariableContext);
- delete static_cast<CXFA_ThisProxy*>(FXJSE_Value_ToObject(hObject, nullptr));
+ delete static_cast<CXFA_ThisProxy*>(FXJSE_Value_ToObject(hObject));
FXJSE_Value_Release(hObject);
FXJSE_Context_Release(hVariableContext);
}
@@ -647,8 +643,7 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
(rndFind.m_Nodes[0]->*(rndFind.m_pScriptAttribute->lpfnCallback))(
hValue, FALSE,
(XFA_ATTRIBUTE)rndFind.m_pScriptAttribute->eAttribute);
- rndFind.m_Nodes.SetAt(0,
- (CXFA_Object*)FXJSE_Value_ToObject(hValue, NULL));
+ rndFind.m_Nodes.SetAt(0, (CXFA_Object*)FXJSE_Value_ToObject(hValue));
FXJSE_Value_Release(hValue);
}
int32_t iSize = m_upObjectArray.GetSize();
diff --git a/xfa/fxjse/cfxjse_arguments.h b/xfa/fxjse/cfxjse_arguments.h
index 423e22d888..d7b6734e14 100644
--- a/xfa/fxjse/cfxjse_arguments.h
+++ b/xfa/fxjse/cfxjse_arguments.h
@@ -18,7 +18,7 @@ class CFXJSE_Arguments {
int32_t GetInt32(int32_t index) const;
FX_FLOAT GetFloat(int32_t index) const;
CFX_ByteString GetUTF8String(int32_t index) const;
- void* GetObject(int32_t index, FXJSE_HCLASS hClass = nullptr) const;
+ void* GetObject(int32_t index) const;
FXJSE_HVALUE GetReturnValue();
};
diff --git a/xfa/fxjse/class.cpp b/xfa/fxjse/class.cpp
index ff5990aa85..18c542a65e 100644
--- a/xfa/fxjse/class.cpp
+++ b/xfa/fxjse/class.cpp
@@ -183,7 +183,7 @@ CFX_ByteString CFXJSE_Arguments::GetUTF8String(int32_t index) const {
return CFX_ByteString(*szStringVal);
}
-void* CFXJSE_Arguments::GetObject(int32_t index, FXJSE_HCLASS hClass) const {
+void* CFXJSE_Arguments::GetObject(int32_t index) const {
const CFXJSE_ArgumentsImpl* lpArguments =
reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
v8::Local<v8::Value> hValue = (*lpArguments->m_pInfo)[index];
@@ -191,8 +191,7 @@ void* CFXJSE_Arguments::GetObject(int32_t index, FXJSE_HCLASS hClass) const {
if (!hValue->IsObject()) {
return NULL;
}
- CFXJSE_Class* lpClass = reinterpret_cast<CFXJSE_Class*>(hClass);
- return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>(), lpClass);
+ return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>());
}
FXJSE_HVALUE CFXJSE_Arguments::GetReturnValue() {
diff --git a/xfa/fxjse/include/fxjse.h b/xfa/fxjse/include/fxjse.h
index d009372c54..fce1b969fb 100644
--- a/xfa/fxjse/include/fxjse.h
+++ b/xfa/fxjse/include/fxjse.h
@@ -103,7 +103,7 @@ FX_FLOAT FXJSE_Value_ToFloat(FXJSE_HVALUE hValue);
double FXJSE_Value_ToDouble(FXJSE_HVALUE hValue);
int32_t FXJSE_Value_ToInteger(FXJSE_HVALUE hValue);
void FXJSE_Value_ToUTF8String(FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput);
-void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue, FXJSE_HCLASS hClass);
+void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue);
void FXJSE_Value_SetUndefined(FXJSE_HVALUE hValue);
void FXJSE_Value_SetNull(FXJSE_HVALUE hValue);
diff --git a/xfa/fxjse/util_inline.h b/xfa/fxjse/util_inline.h
index e61dc6aa80..336886b666 100644
--- a/xfa/fxjse/util_inline.h
+++ b/xfa/fxjse/util_inline.h
@@ -20,8 +20,7 @@ static V8_INLINE void FXJSE_UpdateObjectBinding(v8::Local<v8::Object>& hObject,
hObject->SetAlignedPointerInInternalField(0, lpNewBinding);
}
static V8_INLINE void* FXJSE_RetrieveObjectBinding(
- const v8::Local<v8::Object>& hJSObject,
- CFXJSE_Class* lpClass = NULL) {
+ const v8::Local<v8::Object>& hJSObject) {
ASSERT(!hJSObject.IsEmpty());
if (!hJSObject->IsObject()) {
return NULL;
@@ -37,14 +36,6 @@ static V8_INLINE void* FXJSE_RetrieveObjectBinding(
return NULL;
}
}
- if (lpClass) {
- v8::Local<v8::FunctionTemplate> hClass =
- v8::Local<v8::FunctionTemplate>::New(
- lpClass->GetContext()->GetRuntime(), lpClass->GetTemplate());
- if (!hClass->HasInstance(hObject)) {
- return NULL;
- }
- }
return hObject->GetAlignedPointerFromInternalField(0);
}
diff --git a/xfa/fxjse/value.cpp b/xfa/fxjse/value.cpp
index c23e12c32f..d3366cf08e 100644
--- a/xfa/fxjse/value.cpp
+++ b/xfa/fxjse/value.cpp
@@ -72,9 +72,8 @@ int32_t FXJSE_Value_ToInteger(FXJSE_HVALUE hValue) {
return reinterpret_cast<CFXJSE_Value*>(hValue)->ToInteger();
}
-void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue, FXJSE_HCLASS hClass) {
- CFXJSE_Class* lpClass = reinterpret_cast<CFXJSE_Class*>(hClass);
- return reinterpret_cast<CFXJSE_Value*>(hValue)->ToObject(lpClass);
+void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue) {
+ return reinterpret_cast<CFXJSE_Value*>(hValue)->ToObject();
}
void FXJSE_Value_SetUndefined(FXJSE_HVALUE hValue) {
@@ -238,7 +237,7 @@ CFXJSE_Value* CFXJSE_Value::Create(v8::Isolate* pIsolate) {
return new CFXJSE_Value(pIsolate);
}
-void* CFXJSE_Value::ToObject(CFXJSE_Class* lpClass) const {
+void* CFXJSE_Value::ToObject() const {
ASSERT(!m_hValue.IsEmpty());
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
@@ -248,7 +247,7 @@ void* CFXJSE_Value::ToObject(CFXJSE_Class* lpClass) const {
if (!hValue->IsObject())
return nullptr;
- return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>(), lpClass);
+ return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>());
}
V8_INLINE static double FXJSE_ftod(FX_FLOAT fNumber) {
diff --git a/xfa/fxjse/value.h b/xfa/fxjse/value.h
index 2939ac34f7..12db5883cf 100644
--- a/xfa/fxjse/value.h
+++ b/xfa/fxjse/value.h
@@ -148,7 +148,7 @@ class CFXJSE_Value {
v8::String::Utf8Value hStringVal(hString);
szStrOutput = *hStringVal;
}
- void* ToObject(CFXJSE_Class* lpClass) const;
+ void* ToObject() const;
public:
V8_INLINE void SetUndefined() {