summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Value.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 13:36:00 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 13:36:00 -0700
commitf1e7c461dfabbff6b65a072f24f6711b34159361 (patch)
tree3b0bb772a59669f06b86824a444fd06642592d4b /fpdfsdk/src/javascript/JS_Value.cpp
parent320b2313d19869333ed453af546e61a9fc2b81c9 (diff)
downloadpdfium-f1e7c461dfabbff6b65a072f24f6711b34159361.tar.xz
Revert "FX_BOOL considered harmful, part 2."
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9. Reason for revert: build failure. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255693002 .
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Value.cpp')
-rw-r--r--fpdfsdk/src/javascript/JS_Value.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 611b1112a0..058f2eaf45 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -256,45 +256,45 @@ FXJSVALUETYPE CJS_Value::GetType() const
return VT_unknown;
}
-bool CJS_Value::IsArrayObject() const
+FX_BOOL CJS_Value::IsArrayObject() const
{
- if(m_pValue.IsEmpty()) return false;
+ if(m_pValue.IsEmpty()) return FALSE;
return m_pValue->IsArray();
}
-bool CJS_Value::IsDateObject() const
+FX_BOOL CJS_Value::IsDateObject() const
{
- if(m_pValue.IsEmpty()) return false;
+ if(m_pValue.IsEmpty()) return FALSE;
return m_pValue->IsDate();
}
//CJS_Value::operator CJS_Array()
-bool CJS_Value::ConvertToArray(CJS_Array &array) const
+FX_BOOL CJS_Value::ConvertToArray(CJS_Array &array) const
{
if (IsArrayObject())
{
array.Attach(JS_ToArray(m_isolate, m_pValue));
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool CJS_Value::ConvertToDate(CJS_Date &date) const
+FX_BOOL CJS_Value::ConvertToDate(CJS_Date &date) const
{
// if (GetType() == VT_date)
// {
// date = (double)(*this);
-// return true;
+// return TRUE;
// }
if (IsDateObject())
{
date.Attach(m_pValue);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
/* ---------------------------- CJS_PropValue ---------------------------- */
@@ -314,12 +314,12 @@ CJS_PropValue::~CJS_PropValue()
{
}
-bool CJS_PropValue::IsSetting()
+FX_BOOL CJS_PropValue::IsSetting()
{
return m_bIsSetting;
}
-bool CJS_PropValue::IsGetting()
+FX_BOOL CJS_PropValue::IsGetting()
{
return !m_bIsSetting;
}
@@ -480,9 +480,9 @@ void CJS_Array::Attach(v8::Local<v8::Array> pArray)
m_pArray = pArray;
}
-bool CJS_Array::IsAttached()
+FX_BOOL CJS_Array::IsAttached()
{
- return false;
+ return FALSE;
}
void CJS_Array::GetElement(unsigned index,CJS_Value &value)
@@ -543,9 +543,9 @@ CJS_Date::~CJS_Date()
{
}
-bool CJS_Date::IsValidDate()
+FX_BOOL CJS_Date::IsValidDate()
{
- if(m_pDate.IsEmpty()) return false;
+ if(m_pDate.IsEmpty()) return FALSE;
return !JS_PortIsNan(JS_ToNumber(m_isolate, m_pDate));
}