Use v8::Global<> directly in CFXJSE_FormCalcContext and tests.

This is complicated by the need to have additional handle scopes
to permit the use of v8::Local<> in several places.

Bug: pdfium:1610
Change-Id: I60eebcc1eecd397efb1bd60bf2d62f1aa91fb869
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/75950
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
diff --git a/fxjs/fxv8.cpp b/fxjs/fxv8.cpp
index 614a122..0f2c656 100644
--- a/fxjs/fxv8.cpp
+++ b/fxjs/fxv8.cpp
@@ -113,6 +113,11 @@
   return pValue->BooleanValue(pIsolate);
 }
 
+float ReentrantToFloatHelper(v8::Isolate* pIsolate,
+                             v8::Local<v8::Value> pValue) {
+  return static_cast<float>(ReentrantToDoubleHelper(pIsolate, pValue));
+}
+
 double ReentrantToDoubleHelper(v8::Isolate* pIsolate,
                                v8::Local<v8::Value> pValue) {
   if (pValue.IsEmpty())