Remove argument from CFXJSE_Value::ToHostObject()

Like the other cases, it is always nullptr.

Change-Id: I280f25899ffbe5e35f4ef3342aec7896edf3e1f2
Reviewed-on: https://pdfium-review.googlesource.com/38592
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp
index dd90727..3efe335 100644
--- a/fxjs/cfxjse_engine.cpp
+++ b/fxjs/cfxjse_engine.cpp
@@ -65,8 +65,8 @@
 
 const char kFormCalcRuntime[] = "pfm_rt";
 
-CXFA_ThisProxy* ToThisProxy(CFXJSE_Value* pValue, CFXJSE_Class* pClass) {
-  return static_cast<CXFA_ThisProxy*>(pValue->ToHostObject(pClass));
+CXFA_ThisProxy* ToThisProxy(CFXJSE_Value* pValue) {
+  return static_cast<CXFA_ThisProxy*>(pValue->ToHostObject());
 }
 
 }  // namespace
@@ -84,7 +84,7 @@
 
 // static.
 CXFA_Object* CFXJSE_Engine::ToObject(CFXJSE_Value* pValue) {
-  CFXJSE_HostObject* pHostObj = pValue->ToHostObject(nullptr);
+  CFXJSE_HostObject* pHostObj = pValue->ToHostObject();
   return pHostObj ? pHostObj->AsCXFAObject() : nullptr;
 }
 
@@ -113,7 +113,7 @@
 
 CFXJSE_Engine::~CFXJSE_Engine() {
   for (const auto& pair : m_mapVariableToContext)
-    delete ToThisProxy(pair.second->GetGlobalObject().get(), nullptr);
+    delete ToThisProxy(pair.second->GetGlobalObject().get());
 }
 
 bool CFXJSE_Engine::RunScript(CXFA_Script::Type eScriptType,
diff --git a/fxjs/cfxjse_formcalc_context.cpp b/fxjs/cfxjse_formcalc_context.cpp
index 6ca57bb..5319466 100644
--- a/fxjs/cfxjse_formcalc_context.cpp
+++ b/fxjs/cfxjse_formcalc_context.cpp
@@ -449,7 +449,7 @@
 }
 
 CFXJSE_FormCalcContext* ToFormCalcContext(CFXJSE_Value* pValue) {
-  CFXJSE_HostObject* pHostObj = pValue->ToHostObject(nullptr);
+  CFXJSE_HostObject* pHostObj = pValue->ToHostObject();
   return pHostObj ? pHostObj->AsFormCalcContext() : nullptr;
 }
 
@@ -4944,8 +4944,7 @@
   if (firstJSObject->IsNull() || secondJSObject->IsNull())
     return false;
 
-  return (firstJSObject->ToHostObject(nullptr) ==
-          secondJSObject->ToHostObject(nullptr));
+  return firstJSObject->ToHostObject() == secondJSObject->ToHostObject();
 }
 
 // static
diff --git a/fxjs/cfxjse_value.cpp b/fxjs/cfxjse_value.cpp
index 5d7f885..915fefc 100644
--- a/fxjs/cfxjse_value.cpp
+++ b/fxjs/cfxjse_value.cpp
@@ -68,18 +68,15 @@
 
 CFXJSE_Value::~CFXJSE_Value() {}
 
-CFXJSE_HostObject* CFXJSE_Value::ToHostObject(CFXJSE_Class* lpClass) const {
-  ASSERT(!m_hValue.IsEmpty());
-
+CFXJSE_HostObject* CFXJSE_Value::ToHostObject() const {
   CFXJSE_ScopeUtil_IsolateHandleRootContext scope(GetIsolate());
   v8::Local<v8::Value> pValue =
       v8::Local<v8::Value>::New(GetIsolate(), m_hValue);
   ASSERT(!pValue.IsEmpty());
-
   if (!pValue->IsObject())
     return nullptr;
 
-  return FXJSE_RetrieveObjectBinding(pValue.As<v8::Object>(), lpClass);
+  return FXJSE_RetrieveObjectBinding(pValue.As<v8::Object>(), nullptr);
 }
 
 void CFXJSE_Value::SetObject(CFXJSE_HostObject* lpObject,
diff --git a/fxjs/cfxjse_value.h b/fxjs/cfxjse_value.h
index 5fbac4d..dd01843 100644
--- a/fxjs/cfxjse_value.h
+++ b/fxjs/cfxjse_value.h
@@ -43,7 +43,7 @@
   WideString ToWideString() const {
     return WideString::FromUTF8(ToString().AsStringView());
   }
-  CFXJSE_HostObject* ToHostObject(CFXJSE_Class* lpClass) const;
+  CFXJSE_HostObject* ToHostObject() const;
 
   void SetUndefined();
   void SetNull();