Remove CFXJSE_Value::SetDate() and IsDate()

They are not called apart from a unit test. There are many date
representations in PDFium, but the JavaScript Date object isn't
one that is required.

Change-Id: Ib15aa69f4f2952fdc055035ca1b3adbb7e030882
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/63011
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/xfa/cfxjse_value.cpp b/fxjs/xfa/cfxjse_value.cpp
index eff4477..1d4cec4 100644
--- a/fxjs/xfa/cfxjse_value.cpp
+++ b/fxjs/xfa/cfxjse_value.cpp
@@ -121,14 +121,6 @@
   m_hValue.Reset(GetIsolate(), hArrayObject);
 }
 
-void CFXJSE_Value::SetDate(double dDouble) {
-  CFXJSE_ScopeUtil_IsolateHandleRootContext scope(GetIsolate());
-  v8::Local<v8::Value> hDate =
-      v8::Date::New(GetIsolate()->GetCurrentContext(), dDouble)
-          .ToLocalChecked();
-  m_hValue.Reset(GetIsolate(), hDate);
-}
-
 void CFXJSE_Value::SetFloat(float fFloat) {
   CFXJSE_ScopeUtil_IsolateHandle scope(GetIsolate());
   v8::Local<v8::Value> pValue = v8::Number::New(GetIsolate(), ftod(fFloat));
@@ -393,16 +385,6 @@
   return hValue->IsFunction();
 }
 
-bool CFXJSE_Value::IsDate() const {
-  if (IsEmpty())
-    return false;
-
-  CFXJSE_ScopeUtil_IsolateHandle scope(GetIsolate());
-  v8::Local<v8::Value> hValue =
-      v8::Local<v8::Value>::New(GetIsolate(), m_hValue);
-  return hValue->IsDate();
-}
-
 bool CFXJSE_Value::ToBoolean() const {
   ASSERT(!IsEmpty());
   CFXJSE_ScopeUtil_IsolateHandleRootContext scope(GetIsolate());
diff --git a/fxjs/xfa/cfxjse_value.h b/fxjs/xfa/cfxjse_value.h
index aea43fd..44cc58c 100644
--- a/fxjs/xfa/cfxjse_value.h
+++ b/fxjs/xfa/cfxjse_value.h
@@ -33,7 +33,6 @@
   bool IsObject() const;
   bool IsArray() const;
   bool IsFunction() const;
-  bool IsDate() const;
   bool ToBoolean() const;
   float ToFloat() const;
   double ToDouble() const;
@@ -56,7 +55,6 @@
   void ClearHostObject();
 
   void SetArray(const std::vector<std::unique_ptr<CFXJSE_Value>>& values);
-  void SetDate(double dDouble);
 
   bool GetObjectProperty(ByteStringView szPropName, CFXJSE_Value* lpPropValue);
   bool SetObjectProperty(ByteStringView szPropName, CFXJSE_Value* lpPropValue);
diff --git a/fxjs/xfa/cfxjse_value_embeddertest.cpp b/fxjs/xfa/cfxjse_value_embeddertest.cpp
index 988111e..e9c39c1 100644
--- a/fxjs/xfa/cfxjse_value_embeddertest.cpp
+++ b/fxjs/xfa/cfxjse_value_embeddertest.cpp
@@ -28,7 +28,6 @@
   EXPECT_FALSE(pValue->IsObject());
   EXPECT_FALSE(pValue->IsArray());
   EXPECT_FALSE(pValue->IsFunction());
-  EXPECT_FALSE(pValue->IsDate());
 }
 
 TEST_F(CFXJSE_ValueEmbedderTest, EmptyArrayInsert) {