| Index: fpdfsdk/javascript/JS_GlobalData.cpp
|
| diff --git a/fpdfsdk/javascript/JS_GlobalData.cpp b/fpdfsdk/javascript/JS_GlobalData.cpp
|
| index 4e3782ec2037c5f5f4ae56bc3047f453740502ec..580cb466e6fa608eec7304eb3df5732ffd050aec 100644
|
| --- a/fpdfsdk/javascript/JS_GlobalData.cpp
|
| +++ b/fpdfsdk/javascript/JS_GlobalData.cpp
|
| @@ -179,32 +179,31 @@ void CJS_GlobalData::SetGlobalVariableNull(const CFX_ByteString& propname) {
|
| m_arrayGlobalData.push_back(std::move(pNewData));
|
| }
|
|
|
| -FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(
|
| - const CFX_ByteString& propname,
|
| - FX_BOOL bPersistent) {
|
| +bool CJS_GlobalData::SetGlobalVariablePersistent(const CFX_ByteString& propname,
|
| + bool bPersistent) {
|
| CFX_ByteString sPropName(propname);
|
| if (!TrimPropName(&sPropName))
|
| - return FALSE;
|
| + return false;
|
|
|
| CJS_GlobalData_Element* pData = GetGlobalVariable(sPropName);
|
| if (!pData)
|
| - return FALSE;
|
| + return false;
|
|
|
| pData->bPersistent = bPersistent;
|
| - return TRUE;
|
| + return true;
|
| }
|
|
|
| -FX_BOOL CJS_GlobalData::DeleteGlobalVariable(const CFX_ByteString& propname) {
|
| +bool CJS_GlobalData::DeleteGlobalVariable(const CFX_ByteString& propname) {
|
| CFX_ByteString sPropName(propname);
|
| if (!TrimPropName(&sPropName))
|
| - return FALSE;
|
| + return false;
|
|
|
| auto iter = FindGlobalVariable(sPropName);
|
| if (iter == m_arrayGlobalData.end())
|
| - return FALSE;
|
| + return false;
|
|
|
| m_arrayGlobalData.erase(iter);
|
| - return TRUE;
|
| + return true;
|
| }
|
|
|
| int32_t CJS_GlobalData::GetSize() const {
|
| @@ -274,13 +273,13 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() {
|
| } break;
|
| }
|
| SetGlobalVariableNumber(sEntry, dData);
|
| - SetGlobalVariablePersistent(sEntry, TRUE);
|
| + SetGlobalVariablePersistent(sEntry, true);
|
| } break;
|
| case JS_GlobalDataType::BOOLEAN: {
|
| uint16_t wData = *((uint16_t*)p);
|
| p += sizeof(uint16_t);
|
| SetGlobalVariableBoolean(sEntry, (bool)(wData == 1));
|
| - SetGlobalVariablePersistent(sEntry, TRUE);
|
| + SetGlobalVariablePersistent(sEntry, true);
|
| } break;
|
| case JS_GlobalDataType::STRING: {
|
| uint32_t dwLength = *((uint32_t*)p);
|
| @@ -290,12 +289,12 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() {
|
| break;
|
|
|
| SetGlobalVariableString(sEntry, CFX_ByteString(p, dwLength));
|
| - SetGlobalVariablePersistent(sEntry, TRUE);
|
| + SetGlobalVariablePersistent(sEntry, true);
|
| p += sizeof(char) * dwLength;
|
| } break;
|
| case JS_GlobalDataType::NULLOBJ: {
|
| SetGlobalVariableNull(sEntry);
|
| - SetGlobalVariablePersistent(sEntry, TRUE);
|
| + SetGlobalVariablePersistent(sEntry, true);
|
| }
|
| case JS_GlobalDataType::OBJECT:
|
| break;
|
|
|