summaryrefslogtreecommitdiff
path: root/xfa/src/fxjse
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fxjse')
-rw-r--r--xfa/src/fxjse/src/class.cpp22
-rw-r--r--xfa/src/fxjse/src/context.cpp6
-rw-r--r--xfa/src/fxjse/src/dynprop.cpp10
-rw-r--r--xfa/src/fxjse/src/runtime.cpp6
-rw-r--r--xfa/src/fxjse/src/value.cpp40
-rw-r--r--xfa/src/fxjse/src/value.h14
6 files changed, 49 insertions, 49 deletions
diff --git a/xfa/src/fxjse/src/class.cpp b/xfa/src/fxjse/src/class.cpp
index e29d4ce306..735a77f1f1 100644
--- a/xfa/src/fxjse/src/class.cpp
+++ b/xfa/src/fxjse/src/class.cpp
@@ -22,7 +22,7 @@ void FXJSE_DefineFunctions(FXJSE_HCONTEXT hContext, const FXJSE_FUNCTION* lpFunc
CFXJSE_ScopeUtil_IsolateHandleContext scope(lpContext);
v8::Isolate *pIsolate = lpContext->GetRuntime();
v8::Local<v8::Object> hGlobalObject = FXJSE_GetGlobalObjectFromContext(scope.GetLocalContext());
- for(FX_INT32 i = 0; i < nNum; i++) {
+ for(int32_t i = 0; i < nNum; i++) {
hGlobalObject->ForceSet(v8::String::NewFromUtf8(pIsolate, lpFunctions[i].name),
v8::Function::New(pIsolate, FXJSE_V8FunctionCallback_Wrapper, v8::External::New(pIsolate, const_cast<FXJSE_FUNCTION*>(lpFunctions + i))),
static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete));
@@ -133,12 +133,12 @@ FXJSE_HRUNTIME CFXJSE_Arguments::GetRuntime() const
const CFXJSE_ArgumentsImpl* lpArguments = reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
return reinterpret_cast<FXJSE_HRUNTIME>(lpArguments->m_pRetValue->GetIsolate());
}
-FX_INT32 CFXJSE_Arguments::GetLength() const
+int32_t CFXJSE_Arguments::GetLength() const
{
const CFXJSE_ArgumentsImpl* lpArguments = reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
return lpArguments->m_pInfo->Length();
}
-FXJSE_HVALUE CFXJSE_Arguments::GetValue(FX_INT32 index) const
+FXJSE_HVALUE CFXJSE_Arguments::GetValue(int32_t index) const
{
const CFXJSE_ArgumentsImpl* lpArguments = reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
CFXJSE_Value* lpArgValue = CFXJSE_Value::Create(v8::Isolate::GetCurrent());
@@ -146,29 +146,29 @@ FXJSE_HVALUE CFXJSE_Arguments::GetValue(FX_INT32 index) const
lpArgValue->ForceSetValue((*lpArguments->m_pInfo)[index]);
return reinterpret_cast<FXJSE_HVALUE>(lpArgValue);
}
-FX_BOOL CFXJSE_Arguments::GetBoolean(FX_INT32 index) const
+FX_BOOL CFXJSE_Arguments::GetBoolean(int32_t index) const
{
const CFXJSE_ArgumentsImpl* lpArguments = reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
return (*lpArguments->m_pInfo)[index]->BooleanValue() ? TRUE : FALSE;
}
-FX_INT32 CFXJSE_Arguments::GetInt32(FX_INT32 index) const
+int32_t CFXJSE_Arguments::GetInt32(int32_t index) const
{
const CFXJSE_ArgumentsImpl* lpArguments = reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
- return static_cast<FX_INT32>((*lpArguments->m_pInfo)[index]->NumberValue());
+ return static_cast<int32_t>((*lpArguments->m_pInfo)[index]->NumberValue());
}
-FX_FLOAT CFXJSE_Arguments::GetFloat(FX_INT32 index) const
+FX_FLOAT CFXJSE_Arguments::GetFloat(int32_t index) const
{
const CFXJSE_ArgumentsImpl* lpArguments = reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
return static_cast<FX_FLOAT>((*lpArguments->m_pInfo)[index]->NumberValue());
}
-CFX_ByteString CFXJSE_Arguments::GetUTF8String(FX_INT32 index) const
+CFX_ByteString CFXJSE_Arguments::GetUTF8String(int32_t index) const
{
const CFXJSE_ArgumentsImpl* lpArguments = reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
v8::Local<v8::String> hString = (*lpArguments->m_pInfo)[index]->ToString();
v8::String::Utf8Value szStringVal(hString);
return CFX_ByteString(*szStringVal);
}
-FX_LPVOID CFXJSE_Arguments::GetObject(FX_INT32 index, FXJSE_HCLASS hClass ) const
+FX_LPVOID CFXJSE_Arguments::GetObject(int32_t index, FXJSE_HCLASS hClass ) const
{
const CFXJSE_ArgumentsImpl* lpArguments = reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
v8::Local<v8::Value> hValue = (*lpArguments->m_pInfo)[index];
@@ -220,7 +220,7 @@ CFXJSE_Class* CFXJSE_Class::Create(CFXJSE_Context* lpContext, const FXJSE_CLASS*
SetUpNamedPropHandler(pIsolate, hObjectTemplate, lpClassDefinition);
}
if(lpClassDefinition->propNum) {
- for(FX_INT32 i = 0; i < lpClassDefinition->propNum; i++) {
+ for(int32_t i = 0; i < lpClassDefinition->propNum; i++) {
hObjectTemplate->SetNativeDataProperty(v8::String::NewFromUtf8(pIsolate, lpClassDefinition->properties[i].name),
lpClassDefinition->properties[i].getProc ? FXJSE_V8GetterCallback_Wrapper : NULL,
lpClassDefinition->properties[i].setProc ? FXJSE_V8SetterCallback_Wrapper : NULL,
@@ -229,7 +229,7 @@ CFXJSE_Class* CFXJSE_Class::Create(CFXJSE_Context* lpContext, const FXJSE_CLASS*
}
}
if(lpClassDefinition->methNum) {
- for(FX_INT32 i = 0; i < lpClassDefinition->methNum; i++) {
+ for(int32_t i = 0; i < lpClassDefinition->methNum; i++) {
hObjectTemplate->Set(v8::String::NewFromUtf8(pIsolate, lpClassDefinition->methods[i].name),
v8::FunctionTemplate::New(pIsolate, FXJSE_V8FunctionCallback_Wrapper,
v8::External::New(pIsolate, const_cast<FXJSE_FUNCTION*>(lpClassDefinition->methods + i))),
diff --git a/xfa/src/fxjse/src/context.cpp b/xfa/src/fxjse/src/context.cpp
index d78729fc35..d2b10db38d 100644
--- a/xfa/src/fxjse/src/context.cpp
+++ b/xfa/src/fxjse/src/context.cpp
@@ -51,7 +51,7 @@ static FX_LPCSTR szCompatibleModeScripts[] = {
};
void FXJSE_Context_EnableCompatibleMode(FXJSE_HCONTEXT hContext, FX_DWORD dwCompatibleFlags)
{
- for (FX_UINT32 i = 0; i < (FX_UINT32)FXJSE_COMPATIBLEMODEFLAGCOUNT; i++) {
+ for (uint32_t i = 0; i < (uint32_t)FXJSE_COMPATIBLEMODEFLAGCOUNT; i++) {
if (dwCompatibleFlags & (1 << i)) {
FXJSE_ExecuteScript(hContext, szCompatibleModeScripts[i], NULL, NULL);
}
@@ -113,7 +113,7 @@ FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue, CFX_ByteString& utf
utf8Message = *hStringVal1;
return TRUE;
}
-FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, FX_INT32& nLine, FX_INT32& nCol)
+FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, int32_t& nLine, int32_t& nCol)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hRetValue);
if(!lpValue) {
@@ -163,7 +163,7 @@ CFXJSE_Context* CFXJSE_Context::Create(v8::Isolate* pIsolate, const FXJSE_CLASS*
}
CFXJSE_Context::~CFXJSE_Context()
{
- for(FX_INT32 i = 0, count = m_rgClasses.GetSize(); i < count; i++) {
+ for(int32_t i = 0, count = m_rgClasses.GetSize(); i < count; i++) {
CFXJSE_Class* pClass = m_rgClasses[i];
if(pClass) {
delete pClass;
diff --git a/xfa/src/fxjse/src/dynprop.cpp b/xfa/src/fxjse/src/dynprop.cpp
index 3fc6c494eb..7c78f6f90a 100644
--- a/xfa/src/fxjse/src/dynprop.cpp
+++ b/xfa/src/fxjse/src/dynprop.cpp
@@ -32,7 +32,7 @@ static void FXJSE_DynPropGetterAdapter_MethodCallback (const v8::FunctionCallbac
static void FXJSE_DynPropGetterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue)
{
ASSERT(lpClass);
- FX_INT32 nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, FALSE);
+ int32_t nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, FALSE);
if(nPropType == FXJSE_ClassPropType_Property) {
if(lpClass->dynPropGetter) {
lpClass->dynPropGetter(hObject, szPropName, hValue);
@@ -54,7 +54,7 @@ static void FXJSE_DynPropGetterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HO
static void FXJSE_DynPropSetterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, FX_BSTR szPropName, FXJSE_HVALUE hValue)
{
ASSERT(lpClass);
- FX_INT32 nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, FALSE);
+ int32_t nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, FALSE);
if(nPropType != FXJSE_ClassPropType_Method) {
if(lpClass->dynPropSetter) {
lpClass->dynPropSetter(hObject, szPropName, hValue);
@@ -64,13 +64,13 @@ static void FXJSE_DynPropSetterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HO
static FX_BOOL FXJSE_DynPropQueryAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, FX_BSTR szPropName)
{
ASSERT(lpClass);
- FX_INT32 nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, TRUE);
+ int32_t nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, TRUE);
return nPropType != FXJSE_ClassPropType_None;
}
static FX_BOOL FXJSE_DynPropDeleterAdapter (const FXJSE_CLASS* lpClass, FXJSE_HOBJECT hObject, FX_BSTR szPropName)
{
ASSERT(lpClass);
- FX_INT32 nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, FALSE);
+ int32_t nPropType = lpClass->dynPropTypeGetter == NULL ? FXJSE_ClassPropType_Property : lpClass->dynPropTypeGetter(hObject, szPropName, FALSE);
if(nPropType != FXJSE_ClassPropType_Method) {
if(lpClass->dynPropDeleter) {
return lpClass->dynPropDeleter(hObject, szPropName);
@@ -230,7 +230,7 @@ static void FXJSE_V8_NamedPropertyQueryCallback(v8::Local<v8::String> property,
if(FXJSE_DynPropQueryAdapter(lpClass, reinterpret_cast<FXJSE_HOBJECT>(lpThisValue), szFxPropName)) {
info.GetReturnValue().Set(v8::DontDelete);
} else {
- const FX_INT32 iV8Absent = 64;
+ const int32_t iV8Absent = 64;
info.GetReturnValue().Set(iV8Absent);
}
delete lpThisValue;
diff --git a/xfa/src/fxjse/src/runtime.cpp b/xfa/src/fxjse/src/runtime.cpp
index d880606551..6f0dbf7601 100644
--- a/xfa/src/fxjse/src/runtime.cpp
+++ b/xfa/src/fxjse/src/runtime.cpp
@@ -111,7 +111,7 @@ void CFXJSE_RuntimeList::AppendRuntime(v8::Isolate* pIsolate)
}
void CFXJSE_RuntimeList::RemoveRuntime(v8::Isolate* pIsolate, CFXJSE_RuntimeList::RuntimeDisposeCallback lpfnDisposeCallback)
{
- FX_INT32 iIdx = m_RuntimeList.Find(pIsolate, 0);
+ int32_t iIdx = m_RuntimeList.Find(pIsolate, 0);
if(iIdx >= 0) {
m_RuntimeList.RemoveAt(iIdx, 1);
}
@@ -121,9 +121,9 @@ void CFXJSE_RuntimeList::RemoveRuntime(v8::Isolate* pIsolate, CFXJSE_RuntimeList
}
void CFXJSE_RuntimeList::RemoveAllRuntimes(CFXJSE_RuntimeList::RuntimeDisposeCallback lpfnDisposeCallback)
{
- FX_INT32 iSize = m_RuntimeList.GetSize();
+ int32_t iSize = m_RuntimeList.GetSize();
if(lpfnDisposeCallback) {
- for(FX_INT32 iIdx = 0; iIdx < iSize; iIdx++) {
+ for(int32_t iIdx = 0; iIdx < iSize; iIdx++) {
lpfnDisposeCallback(m_RuntimeList[iIdx]);
}
}
diff --git a/xfa/src/fxjse/src/value.cpp b/xfa/src/fxjse/src/value.cpp
index 21939e8747..783961657a 100644
--- a/xfa/src/fxjse/src/value.cpp
+++ b/xfa/src/fxjse/src/value.cpp
@@ -84,7 +84,7 @@ void FXJSE_Value_ToUTF8String (FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput
ASSERT(lpValue);
return lpValue->ToString(szStrOutput);
}
-FX_INT32 FXJSE_Value_ToInteger (FXJSE_HVALUE hValue)
+int32_t FXJSE_Value_ToInteger (FXJSE_HVALUE hValue)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
ASSERT(lpValue);
@@ -121,7 +121,7 @@ void FXJSE_Value_SetUTF8String (FXJSE_HVALUE hValue, FX_BSTR szString)
ASSERT(lpValue);
return lpValue->SetString(szString);
}
-void FXJSE_Value_SetInteger (FXJSE_HVALUE hValue, FX_INT32 nInteger)
+void FXJSE_Value_SetInteger (FXJSE_HVALUE hValue, int32_t nInteger)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
ASSERT(lpValue);
@@ -150,7 +150,7 @@ void FXJSE_Value_SetObject (FXJSE_HVALUE hValue, FX_LPVOID lpObject, FXJSE_HCL
lpValue->SetHostObject(lpObject, lpClass);
}
}
-void FXJSE_Value_SetArray (FXJSE_HVALUE hValue, FX_UINT32 uValueCount, FXJSE_HVALUE* rgValues)
+void FXJSE_Value_SetArray (FXJSE_HVALUE hValue, uint32_t uValueCount, FXJSE_HVALUE* rgValues)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
return lpValue->SetArray(uValueCount, reinterpret_cast<CFXJSE_Value**>(rgValues));
@@ -181,14 +181,14 @@ FX_BOOL FXJSE_Value_SetObjectProp (FXJSE_HVALUE hValue, FX_BSTR szPropName, FX
ASSERT(lpValue && lpPropValue);
return lpValue->SetObjectProperty(szPropName, lpPropValue);
}
-FX_BOOL FXJSE_Value_GetObjectPropByIdx (FXJSE_HVALUE hValue, FX_UINT32 uPropIdx, FXJSE_HVALUE hPropValue)
+FX_BOOL FXJSE_Value_GetObjectPropByIdx (FXJSE_HVALUE hValue, uint32_t uPropIdx, FXJSE_HVALUE hPropValue)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
CFXJSE_Value* lpPropValue = reinterpret_cast<CFXJSE_Value*>(hPropValue);
ASSERT(lpValue && lpPropValue);
return lpValue->GetObjectProperty(uPropIdx, lpPropValue);
}
-FX_BOOL FXJSE_Value_SetObjectPropByIdx (FXJSE_HVALUE hValue, FX_UINT32 uPropIdx, FXJSE_HVALUE hPropValue)
+FX_BOOL FXJSE_Value_SetObjectPropByIdx (FXJSE_HVALUE hValue, uint32_t uPropIdx, FXJSE_HVALUE hPropValue)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
CFXJSE_Value* lpPropValue = reinterpret_cast<CFXJSE_Value*>(hPropValue);
@@ -222,7 +222,7 @@ FX_BOOL FXJSE_Value_SetFunctionBind (FXJSE_HVALUE hValue, FXJSE_HVALUE hOldFunc
ASSERT(lpValue && lpOldFunction && lpNewThis);
return lpValue->SetFunctionBind(lpOldFunction, lpNewThis);
}
-FX_BOOL FXJSE_Value_CallFunction(FXJSE_HVALUE hFunction, FXJSE_HVALUE hThis, FXJSE_HVALUE hRetValue, FX_UINT32 nArgCount, FXJSE_HVALUE* lpArgs)
+FX_BOOL FXJSE_Value_CallFunction(FXJSE_HVALUE hFunction, FXJSE_HVALUE hThis, FXJSE_HVALUE hRetValue, uint32_t nArgCount, FXJSE_HVALUE* lpArgs)
{
CFXJSE_Value* lpFunction = reinterpret_cast<CFXJSE_Value*>(hFunction);
CFXJSE_Value* lpThis = reinterpret_cast<CFXJSE_Value*>(hThis);
@@ -293,25 +293,25 @@ V8_INLINE static double FXJSE_ftod(FX_FLOAT fNumber)
ASSERT(FALSE);
return fNumber;
}
- FX_UINT32 nFloatBits = (FX_UINT32&)fNumber;
- FX_UINT8 nExponent = (FX_UINT8)(nFloatBits >> 16 >> 7 );
+ uint32_t nFloatBits = (uint32_t&)fNumber;
+ uint8_t nExponent = (uint8_t)(nFloatBits >> 16 >> 7 );
if(nExponent == 0 || nExponent == 255) {
return fNumber;
}
- FX_INT8 nErrExp = nExponent - 127 - 23;
+ int8_t nErrExp = nExponent - 127 - 23;
if(nErrExp >= 0) {
return fNumber;
}
double dwError = pow(2.0, nErrExp), dwErrorHalf = dwError / 2;
double dNumber = fNumber, dNumberAbs = fabs(fNumber);
double dNumberAbsMin = dNumberAbs - dwErrorHalf, dNumberAbsMax = dNumberAbs + dwErrorHalf;
- FX_INT32 iErrPos = 0;
+ int32_t iErrPos = 0;
if(floor(dNumberAbsMin) == floor(dNumberAbsMax)) {
dNumberAbsMin = fmod(dNumberAbsMin, 1.0);
dNumberAbsMax = fmod(dNumberAbsMax, 1.0);
- FX_INT32 iErrPosMin = 1, iErrPosMax = 38;
+ int32_t iErrPosMin = 1, iErrPosMax = 38;
do {
- FX_INT32 iMid = (iErrPosMin + iErrPosMax) / 2;
+ int32_t iMid = (iErrPosMin + iErrPosMax) / 2;
double dPow = pow(10.0, iMid);
if(floor(dNumberAbsMin * dPow) == floor(dNumberAbsMax * dPow)) {
iErrPosMin = iMid + 1;
@@ -339,12 +339,12 @@ void CFXJSE_Value::SetHostObject(FX_LPVOID lpObject, CFXJSE_Class* lpClass)
FXJSE_UpdateObjectBinding(hObject, lpObject);
m_hValue.Reset(m_pIsolate, hObject);
}
-void CFXJSE_Value::SetArray(FX_UINT32 uValueCount, CFXJSE_Value** rgValues)
+void CFXJSE_Value::SetArray(uint32_t uValueCount, CFXJSE_Value** rgValues)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Array> hArrayObject = v8::Array::New(m_pIsolate, uValueCount);
if (rgValues) {
- for(FX_UINT32 i = 0; i < uValueCount; i++) {
+ for(uint32_t i = 0; i < uValueCount; i++) {
if(rgValues[i]) {
hArrayObject->Set(i, v8::Local<v8::Value>::New(m_pIsolate, rgValues[i]->DirectGetValue()));
}
@@ -379,7 +379,7 @@ FX_BOOL CFXJSE_Value::GetObjectProperty(FX_BSTR szPropName, CFXJSE_Value* lpProp
lpPropValue->ForceSetValue(hPropValue);
return TRUE;
}
-FX_BOOL CFXJSE_Value::SetObjectProperty(FX_UINT32 uPropIdx, CFXJSE_Value* lpPropValue)
+FX_BOOL CFXJSE_Value::SetObjectProperty(uint32_t uPropIdx, CFXJSE_Value* lpPropValue)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Value> hObject = v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
@@ -389,7 +389,7 @@ FX_BOOL CFXJSE_Value::SetObjectProperty(FX_UINT32 uPropIdx, CFXJSE_Value* lpProp
v8::Local<v8::Value> hPropValue = v8::Local<v8::Value>::New(m_pIsolate, lpPropValue->DirectGetValue());
return (FX_BOOL)hObject.As<v8::Object>()->Set(uPropIdx, hPropValue);
}
-FX_BOOL CFXJSE_Value::GetObjectProperty(FX_UINT32 uPropIdx, CFXJSE_Value* lpPropValue)
+FX_BOOL CFXJSE_Value::GetObjectProperty(uint32_t uPropIdx, CFXJSE_Value* lpPropValue)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Value> hObject = v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
@@ -453,8 +453,8 @@ FX_BOOL CFXJSE_Value::SetFunctionBind(CFXJSE_Value* lpOldFunction, CFXJSE_Value*
m_hValue.Reset(m_pIsolate, hBoundFunction);
return TRUE;
}
-#define FXJSE_INVALID_PTR ((FX_LPVOID)(FX_INTPTR)-1)
-FX_BOOL CFXJSE_Value::Call(CFXJSE_Value* lpReceiver, CFXJSE_Value* lpRetValue, FX_UINT32 nArgCount, FXJSE_HVALUE* lpArgs)
+#define FXJSE_INVALID_PTR ((FX_LPVOID)(intptr_t)-1)
+FX_BOOL CFXJSE_Value::Call(CFXJSE_Value* lpReceiver, CFXJSE_Value* lpRetValue, uint32_t nArgCount, FXJSE_HVALUE* lpArgs)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Value> hFunctionValue = v8::Local<v8::Value>::New(m_pIsolate, DirectGetValue());
@@ -473,7 +473,7 @@ FX_BOOL CFXJSE_Value::Call(CFXJSE_Value* lpReceiver, CFXJSE_Value* lpRetValue, F
if (!lpLocalArgs) {
return FALSE;
}
- for (FX_UINT32 i = 0; i < nArgCount; i++) {
+ for (uint32_t i = 0; i < nArgCount; i++) {
new (lpLocalArgs + i) v8::Local<v8::Value>;
CFXJSE_Value* lpArg = (CFXJSE_Value*)lpArgs[i];
if(lpArg) {
@@ -505,7 +505,7 @@ FX_BOOL CFXJSE_Value::Call(CFXJSE_Value* lpReceiver, CFXJSE_Value* lpRetValue, F
lpRetValue->ForceSetValue(hReturnValue);
}
if(lpLocalArgs) {
- for (FX_UINT32 i = 0; i < nArgCount; i++) {
+ for (uint32_t i = 0; i < nArgCount; i++) {
lpLocalArgs[i].~Local();
}
FX_Free(lpLocalArgs);
diff --git a/xfa/src/fxjse/src/value.h b/xfa/src/fxjse/src/value.h
index 547ae9251f..482015811b 100644
--- a/xfa/src/fxjse/src/value.h
+++ b/xfa/src/fxjse/src/value.h
@@ -128,12 +128,12 @@ public:
v8::Local<v8::Value> hValue = v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
return static_cast<FXJSE_DOUBLE>(hValue->NumberValue());
}
- V8_INLINE FX_INT32 ToInteger() const
+ V8_INLINE int32_t ToInteger() const
{
ASSERT(!m_hValue.IsEmpty());
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
v8::Local<v8::Value> hValue = v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
- return static_cast<FX_INT32>(hValue->NumberValue());
+ return static_cast<int32_t>(hValue->NumberValue());
}
V8_INLINE void ToString(CFX_ByteString& szStrOutput) const
{
@@ -164,7 +164,7 @@ public:
v8::Local<v8::Value> hValue = v8::Boolean::New(m_pIsolate, bBoolean != FALSE);
m_hValue.Reset(m_pIsolate, hValue);
}
- V8_INLINE void SetInteger(FX_INT32 nInteger)
+ V8_INLINE void SetInteger(int32_t nInteger)
{
CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate);
v8::Local<v8::Value> hValue = v8::Integer::New(m_pIsolate, nInteger);
@@ -192,18 +192,18 @@ public:
m_hValue.Reset(m_pIsolate, hValue);
}
void SetHostObject(FX_LPVOID lpObject, CFXJSE_Class* lpClass);
- void SetArray(FX_UINT32 uValueCount, CFXJSE_Value** rgValues);
+ void SetArray(uint32_t uValueCount, CFXJSE_Value** rgValues);
void SetDate(FXJSE_DOUBLE dDouble);
public:
FX_BOOL GetObjectProperty(FX_BSTR szPropName, CFXJSE_Value* lpPropValue);
FX_BOOL SetObjectProperty(FX_BSTR szPropName, CFXJSE_Value* lpPropValue);
- FX_BOOL GetObjectProperty(FX_UINT32 uPropIdx, CFXJSE_Value* lpPropValue);
- FX_BOOL SetObjectProperty(FX_UINT32 uPropIdx, CFXJSE_Value* lpPropValue);
+ FX_BOOL GetObjectProperty(uint32_t uPropIdx, CFXJSE_Value* lpPropValue);
+ FX_BOOL SetObjectProperty(uint32_t uPropIdx, CFXJSE_Value* lpPropValue);
FX_BOOL DeleteObjectProperty(FX_BSTR szPropName);
FX_BOOL HasObjectOwnProperty(FX_BSTR szPropName, FX_BOOL bUseTypeGetter);
FX_BOOL SetObjectOwnProperty(FX_BSTR szPropName, CFXJSE_Value* lpPropValue);
FX_BOOL SetFunctionBind(CFXJSE_Value* lpOldFunction, CFXJSE_Value* lpNewThis);
- FX_BOOL Call(CFXJSE_Value* lpReceiver, CFXJSE_Value* lpRetValue, FX_UINT32 nArgCount, FXJSE_HVALUE* lpArgs);
+ FX_BOOL Call(CFXJSE_Value* lpReceiver, CFXJSE_Value* lpRetValue, uint32_t nArgCount, FXJSE_HVALUE* lpArgs);
public:
V8_INLINE v8::Isolate* GetIsolate() const
{