summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Value.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-27 12:08:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-27 12:08:12 -0700
commit8d2aae7ee320da3a8ffe01c57e38b3f98443257d (patch)
treee694c6f82ec72fa46e6172b4475996b30d3f6a3a /fpdfsdk/src/javascript/JS_Value.cpp
parentff46aaf499edcf153ee2f57c7016587aa96dcfa0 (diff)
downloadpdfium-8d2aae7ee320da3a8ffe01c57e38b3f98443257d.tar.xz
Revert "FX Bool considered harmful, part 3"
This reverts commit ff46aaf499edcf153ee2f57c7016587aa96dcfa0. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255293002 .
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));
}