Add exception helper to fxv8.h.

Change-Id: I6fdfad87e7c36cbffd3ea59e74572eb22525e754
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/67511
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fxjs/fxv8.cpp b/fxjs/fxv8.cpp
index 8068f39..7b52d0b 100644
--- a/fxjs/fxv8.cpp
+++ b/fxjs/fxv8.cpp
@@ -115,4 +115,12 @@
   return pObj->Set(pIsolate->GetCurrentContext(), name, pPut).IsJust();
 }
 
+void ThrowExceptionHelper(v8::Isolate* pIsolate, ByteStringView str) {
+  pIsolate->ThrowException(NewStringHelper(pIsolate, str));
+}
+
+void ThrowExceptionHelper(v8::Isolate* pIsolate, WideStringView str) {
+  pIsolate->ThrowException(NewStringHelper(pIsolate, str));
+}
+
 }  // namespace fxv8