Resolve an old TODO() about non-v8 build using |JS_| functions.

Remove the JS_ prefix in the SubmitForm() case, as it is not
directly called from fxjs. Remove the JS_ prefix in the
GetFilePath() case, but also provide a JS_ wrapper. Ideally,
all of the JS_ functions would be declared as an interface
in fxjs itself, so this helps keep that consistent.

-- Make SubmitForm() take a span.

Change-Id: I79c3472fa7338112fede7965f5dfa014dad781df
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/58970
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_interactiveform.cpp b/fpdfsdk/cpdfsdk_interactiveform.cpp
index b33bd06..e75e58b 100644
--- a/fpdfsdk/cpdfsdk_interactiveform.cpp
+++ b/fpdfsdk/cpdfsdk_interactiveform.cpp
@@ -485,7 +485,7 @@
   if (bUrlEncoded && !FDFToURLEncodedData(&buffer))
     return false;
 
-  m_pFormFillEnv->JS_docSubmitForm(buffer.data(), buffer.size(), csDestination);
+  m_pFormFillEnv->SubmitForm(buffer, csDestination);
   return true;
 }
 
@@ -493,7 +493,7 @@
     const std::vector<CPDF_FormField*>& fields,
     bool bIncludeOrExclude) {
   std::unique_ptr<CFDF_Document> pFDF = m_pInteractiveForm->ExportToFDF(
-      m_pFormFillEnv->JS_docGetFilePath(), fields, bIncludeOrExclude, false);
+      m_pFormFillEnv->GetFilePath(), fields, bIncludeOrExclude, false);
 
   return pFDF ? pFDF->WriteToString() : ByteString();
 }
@@ -503,8 +503,8 @@
   if (sDestination.IsEmpty())
     return false;
 
-  std::unique_ptr<CFDF_Document> pFDFDoc = m_pInteractiveForm->ExportToFDF(
-      m_pFormFillEnv->JS_docGetFilePath(), false);
+  std::unique_ptr<CFDF_Document> pFDFDoc =
+      m_pInteractiveForm->ExportToFDF(m_pFormFillEnv->GetFilePath(), false);
   if (!pFDFDoc)
     return false;
 
@@ -516,13 +516,13 @@
   if (bUrlEncoded && !FDFToURLEncodedData(&buffer))
     return false;
 
-  m_pFormFillEnv->JS_docSubmitForm(buffer.data(), buffer.size(), sDestination);
+  m_pFormFillEnv->SubmitForm(buffer, sDestination);
   return true;
 }
 
 ByteString CPDFSDK_InteractiveForm::ExportFormToFDFTextBuf() {
-  std::unique_ptr<CFDF_Document> pFDF = m_pInteractiveForm->ExportToFDF(
-      m_pFormFillEnv->JS_docGetFilePath(), false);
+  std::unique_ptr<CFDF_Document> pFDF =
+      m_pInteractiveForm->ExportToFDF(m_pFormFillEnv->GetFilePath(), false);
 
   return pFDF ? pFDF->WriteToString() : ByteString();
 }